2016/02/18分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Merge pull request #23570 from rthbound/addresses-23568
activerecord/lib/active_record/attribute_assignment.rb
の修正です。
accepts_nested_attributes_for
を使用している場合に、associtaionに存在しないアトリビュートを指定して保存しようとした際にのエラーメッセージで、エラーメッセージに表示されるクラス名 / アトリビュート名が親クラスの情報になっていたのを、正しく子associationの情報を表示するよう修正しています。
issueより。
# before Dashboard.new(measures_attributes: [{stinky: "yup"}]) #=> ActiveModel::UnknownAttributeError: unknown attribute 'measures_attributes' for Dashboard. # after Dashboard.new.measures_attributes = [{stinky: "yup"}] #=> ActiveModel::UnknownAttributeError: unknown attribute 'stinky' for Measure.
Merge pull request #22365 from phuibonhoa/phuibonhoa/polymorphic_where_multiple_types
Active Recordの修正です。
polymorphic associationsを使用している場合に、where
に異なるtypeのインスタンスを含むしたArrayを渡した場合に、正しく処理が行われないバグがあったのを修正しています。
CHANGELOGより。
PriceEstimate.where(estimate_of: [Treasure.find(1), Car.find(2)]) # => SELECT "price_estimates".* FROM "price_estimates" WHERE (("price_estimates"."estimate_of_type" = 'Treasure' AND "price_estimates"."estimate_of_id" = 1) OR ("price_estimates"."estimate_of_type" = 'Car' AND "price_estimates"."estimate_of_id" = 2))
partially revert 69009f4473637a44ade26d954ef5ddea6ff903f2
actionpack/lib/action_controller/metal.rb
の修正です。
ActionController::Metal#response_body=
メソッドで、メソッド内でbodyのresponseへのwrite処理を行うようにしていたのを、write処理は行わずresponse.body
にbodyへのセット処理だけを行うよう修正しています。
ここでwrite処理を行ってしまうと、Fiber basedのstreaming templatesの処理が正しく行われない為との事です。
Remove accidentally duplicated change log title [ci skip]
activerecord/CHANGELOG.md
の修正です。
Merge pull request #22365 from phuibonhoa/phuibonhoa/polymorphic_where_multiple_types で誤ってCHANGELOGに同じentryのタイトルが記載されてしまったので、片方削除しています。
Fix indentation for code block in changelog
activerecord/CHANGELOG.md
の修正です。
Merge pull request #22365 from phuibonhoa/phuibonhoa/polymorphic_where_multiple_typesで追加されたentryのコードexampleが正しくcode blockとして表示されるよう、インデントを調整しています。
fields_for_style needs to test for AC::Parameters https://github.com/rails/rails/commit/04b410f83350aa8a9b6f181cc7c37f2c2653300f
actionpack/test/controller/parameters/parameters_permit_test.rb
の修正です。
ActionController::Parameters#fields_for_style?メソッドで
@parametersが
Parameters`クラスかどうかもチェックするよう修正しています。
- @parameters.all? { |k, v| k =~ /\A-?\d+\z/ && v.is_a?(Hash) } + @parameters.all? { |k, v| k =~ /\A-?\d+\z/ && (v.is_a?(Hash) || v.is_a?(Parameters)) }
ActionController::Parameters
のhashの中に更にActionController::Parameters
のインスタンスがいた場合に、正しくチェック処理が行われないバグがあった為、対応したとの事です。
Add accidentally removed #
[ci skip]
activerecord/CHANGELOG.md
の修正です。
Fix indentation for code block in changelogで誤ってexampleの実行結果からコメント(#
)を削除してしまってのを、戻しています。
Merge pull request #23736 from kamipo/remove_needless_case_insensitive_comparison_in_mysql2_adapter
activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
、
activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
の修正です。
mysql2 adapterから不要なcase_insensitive_comparison
メソッドを削除しています。
Fix the language in engines guide
rails guideのGetting Started with Engines
の修正です。
Generating an Article Resource
の項、説明対象のcontroller名をタイポしている箇所があったのを修正しています。
set skip_listen
option to dummy appplication
railties/lib/rails/generators/rails/plugin/plugin_generator.rb
の修正です。
pluginのtest配下に生成されるdummy aplicationのデフォルトにskip_listen
を追加しています。
元々、ファイルの更新監視にlisten
を使用したActiveSupport::EventedFileUpdateChecker
を使用するようになっていたのですが、pluginのgemspecにはlisten
を使用するよう指定が行われておらず、dummy appplicationで何か処理を行おうとするとエラーになってしまっていたのでデフォルトではActiveSupport::EventedFileUpdateChecker
を無効になるように、skip_listen
オプションを追加しています。
Missing documentation about hash algorithm option for MessageVerifier [ci skip]
activesupport/lib/active_support/message_verifier.rb
のdocの修正です。
MessageVerifier
クラスのdocに、hashアルゴリズムのデフォルトはSHA1
であることと、変更したい場合はdigest
オプションを指定すれば変更出来る旨説明を追加しています。