2021/03/24分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Fix SQL result of Book.joins(reviews: :customer)
query example
rails guideのActive Record Query Interface
の修正です。
Joining Nested Associations (Single Level)
の項にあるexampleコードの実行結果が実際の結果と異なっていたのを修正しています。
Prevent double save of cyclic associations
Active Recordの修正です。
associationの定義が循環している場合に、auto saveでrecordが二重に保存されてしまうバグがあったのを修正しています。
Exclude #saving? from API docs
activerecord/lib/active_record/autosave_association.rb
のdocの修正です。
内部APIであるAutosaveAssociation#saving?
メソッドがAPI docに表示されないよう修正しています。
activerecord/lib/active_record/autosave_association.rb
、
activerecord/test/cases/autosave_association_test.rb
の修正です。
can_save?
メソッドの可視性をprotected
に変更、及び、テストから不要なグローバル変数の削除等を行っています。
Add _
prefix for the internal methods
activerecord/lib/active_record/autosave_association.rb
の修正です。
内部用のメソッドに_
prefixを追加しています。同名のメソッドがユーザに定義されて処理が上書きされてしまうのを避ける為。
Merge pull request #41725 from okuramasafumi/add-more-examples-to-routes-shallow-doc
rails guideのRails Routing from the Outside In
の修正です。
Shallow Nesting
の項に、サンプルのroutesで生成されるroutingの一覧を追加しています。
Document Destroy Async (#41680)
rails guideのActive Record Associations
の修正です。
dependent
のオプションについて説明している箇所に、:destroy_async
についての説明を追加しています。
Merge pull request #41745 from dylanahsmith/ar-class-inspection-filter
activerecord/lib/active_record/core.rb
の修正です。
ActiveRecord::Base.filter_attributes
にProcを指定している場合、Active Record objectのmarshal dump処理がエラーになってしまうバグがあったのを修正しています。
Merge pull request #40789 from csutter/deprecate-remote-ip-single-value
actionpack/lib/action_dispatch/middleware/remote_ip.rb
の修正です。
config.action_dispatch.trusted_proxies
にsingle valueを指定するがdeprecateになりました。config.action_dispatch.trusted_proxies
にsingle valueを指定した場合とenumerableを指定した場合とで挙動が違う(デフォルトの値に追加する、とデフォルトの値を上書きする)のが混乱の元であり、single valueの方の挙動を維持する必要は無いだろう、との事でdeprecateになりました。