2024/05/09分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Association option
query_constraints
is deprecated in favor offoreign_key
. - Add
index_errors: :nested_attributes_order
mode. - Fix
index_errors
having incorrect index in association validation errors.
activejob/CHANGELOG.md
Warn about changing query_constraints:
behavior
activerecord/lib/active_record/reflection.rb
の修正です。
assocationのquery_constraints
オプションを使用した場合、deprecateメッセージを出力するよう修正しています。現在のquery_constraints
オプションと同じ挙動を維持したい場合、foreign_key
オプションを使用する必要があります。query_constraints
オプションの挙動を変更する予定があり、breaking changeにならないようにするために、まず今の挙動をdeprecateにしています。
Replace allocations count by GC time in request logs
request logsに出力していたAllocations countを出力しないようにし、代わりにGCの実行時間(GC.total_time
)を出力するよう修正しています。Allocations countはスレッド毎の値ではないため、request logsに含める意味があまり無さそう、という理由で削除されています。GCの実行時間もスレッド毎の値ではないのですが、GCによるレスポンス速度の劣化が発生したような場合に参考になる、という理由で追加されたようです。
Active Job: Correctly use the desired test adapter in tests
Active Jobの修正です。
ActionDispatch::IntegrationTest
やActionMailer::TestCase
などのテストを実行する際、テストで使用するadapterがconfigに指定したadapterにならなかった(強制的にTestAdapter
やInlineAdapter
になる)のを、configに指定したadapterでテストが実行出来るよう修正しています。
Add index_errors: :nested_attributes_order mode
Active Recordの修正です。
associationのvalidation errorsのindex、nested attributesのsetterで受け取った順のorderに出来るよう修正しています。この挙動を有効にしたい場合、associationの定義に、index_errors: :nested_attributes_order
を指定する必要があります。また、この場合、reject_if
で除外されたassociationを除く値でindexは計算されるようになります。
has_many :comments, index_errors: :nested_attributes_order
合わせて、index_errors
のデフォルトの挙動でassociationのvalidation errorsのindexが正しく設定されない事があるバグがあったのを修正しています。
Merge pull request #51504 from MooseCowBear/navigation-highlight
rails guideの修正です。
guide内をスクロールした際、ナビゲーションバーに今どのセクションにいるかをハイライト表示するよう修正しています。