2015/03/23分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
[ci skip] Add link for "parameter_names section"
rails guideのForm Helpers
の修正です。
Binding a Form to an Object
の項、paramについて説明している箇所で、Understanding Parameter Naming Conventions
の項へのリンクを追加しています。
Change 'a' to 'an' for 'HABTM' word [ci skip]
rails guideのActive Record Migrations
の修正です。
a HABTM
-> an HABTM
にタイポを修正しています。
Deprecate alias_method_chain in favour of Module#prepend
ActiveSupportの修正です。
alias_method_chain
メソッドがdeprecateになりました。代わりにRuby標準のModule#prepend
を使ってね、との事です。
ただ、Ruby 2.2.1には、ClassにModuleをprependするとSystemStackError
が起きてしまうバグがあり、まだRails内の一部機能にalias_method_chain
を使ってる状態になっています。
Move #19447 changelog to the top and reword it a bit [ci skip]
activerecord/CHANGELOG.md
の修正です。
Check subtype limit before using the default limitの対応をCHANGELOGの先頭に移動、及び微修正を行っています。
Merge pull request #19455 from jonatack/patch-1
rails guideのAction View Overview
の修正です。
Hashを使用する際、値の前後にスペースを入れるよう修正しています。
- <%= render partial: "product", locals: {product: product} %> + <%= render partial: "product", locals: { product: product } %>
Fix ActiveModel::Errors#delete return value to stay backward compatible
activemodel/lib/active_model/errors.rb
のdoc、及び
activemodel/test/cases/errors_test.rb
の修正です。
ActiveModel::Errors#delete
メソッドが削除した値を返すテストの追加、及びActiveModel::Errors
クラスのdocでdeprecateになったメソッドを使用していたのを、使用しないよう修正しています。
Fix arguments order on assertion
activemodel/test/cases/errors_test.rb
の修正です。
先のコミットで追加されたテストで、assert_equal
メソッドの引数の順番が間違えていた(actual、expectedの順番になっていた)のを修正しています。
Simplify setting button form options
actionview/lib/action_view/helpers/url_helper.rb
の修正です。
button_to
メソッドで、不要なHash#merge!
メソッドの呼び出しを削除しています。
Make sure to persist a newly-nil serialized value
activerecord/lib/active_record/type/serialized.rb
の修正です。
serialized hashの値を更新した場合、更新前の値が取得されてしまうバグがあったのを修正しています。
class User < ActiveRecord::Base serialize :user_meta, Hash end u = User.new u.user_meta = {a_key: 'a_value'} u.save # => true u.reload.user_meta # => {a_key: 'a_value'} u.user_meta.delete(:a_key) u.user_meta # => {} u.save # => true u.reload.user_meta # => {a_key: 'a_value'}
Provide a more truthful #inspect
activerecord/lib/active_record/type/serialized.rb
の修正です。
Serialized
クラスにinspect
メソッドを追加しています。
+ def inspect + Kernel.instance_method(:inspect).bind(self).call + end
デバッグ用ですね。
remove old unavailable link with relevant fix
各docの修正です。もう存在しないhttp://dev.rubyonrails.org/
へのリンクが残っている箇所があったのを一通り修正しています。
update mysql link that has been replaced
activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
の修正です。
MySQLへのリンク先に誤りがあったのを修正しています。
Remove reference to Numeric#from_now, as it is no longer supported
activesupport/lib/active_support/core_ext/integer/time.rb
、
activesupport/lib/active_support/core_ext/numeric/time.rb
のdocの修正です。
もう存在しないNumeric#from_now
メソッドについての説明が残ってしまっていたのを削除しています。
Add documentation for Duration#to_i for clarification
activesupport/lib/active_support/duration.rb
の修正です。
Duration#to_i
メソッドのdocを追加しています。
Fix ActionDispatch::PublicExceptions returning string rack status
actionpack/lib/action_dispatch/middleware/public_exceptions.rb
の修正です。
call
メソッドでrackからhttp statusを取得する際、integerに変換するよう修正しています。
- status = env["PATH_INFO"][1..-1] + status = env["PATH_INFO"][1..-1].to_i
actionpack/test/controller/show_exceptions_test.rb
の修正です。
先のhttp statusの変換処理の影響でコケてしまったテストがあったのを修正しています。