2023/04/27分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Deprecate
deferrable: true
option ofadd_foreign_key
. - The deferrable foreign key can be passed to
t.references
. - Add support for
Array#intersect?
toActiveRecord::Relation
.
Remove noise from actionmailer callbacks test
actionmailer/test/callbacks_test.rb
の修正です。
Action Mailerのcallbackのテストで不要なログがstdoutに出力されないよう修正しています。
Merge pull request #47659 from alpaca-tc/add_foreign_key_deferrable_must_be_false_or_symbol
Active Recordの修正です。
add_foreign_key
メソッドのdeferrable: true
オプションをdeprecateにしています。deferrable
にtrueを指定した場合に:immediate
とみなされる、という挙動がわかりづらい(deferrable
には他にもSymbolの値が指定出来る)為。同様の挙動にしたい場合、今後はdeferrable: :immediate
を指定する必要があります。
The deferrable foreign key can be passed to t.references
.
activerecord/lib/active_record/connection_adapters/postgresql/schema_creation.rb
の修正です。
t.references
にdeferrable foreign keyを指定出来るよう修正しています。
Merge pull request #47987 from p8/guides/unlink-asset-pipeline-libs
rails guideのThe Asset Pipeline
の修正です。
headingで外部ライブラリへのリンクを設定している箇所があったのを、headingではリンクせず、本文中にリンクを設定するよう修正しています。
activejob/test/cases/test_helper_test.rb
の修正です。
test用のassertionメソッドでqueue nameにSymbolを指定出来る事を確認するテストを追加しています。
activerecord/lib/active_record/relation/delegation.rb
の修正です。
ActiveRecord::Relation
がdelegateするメソッドの一覧にRuby 3.1で追加されたArray#intersect?
を追加しています。
Merge pull request #47767 from joshuay03/fix-updated-at-not-updating-in-before-update
activerecord/lib/active_record/callbacks.rb
、
activerecord/lib/active_record/timestamp.rb
の修正です。
before_update
callbackでのみattributeが変更された場合に、updated_at
が更新されないバグがあったのを修正しています。
Allow insert_all
/upsert_all
to use indexes with columns not in the same order as in :unique_by
activerecord/lib/active_record/insert_all.rb
の修正です。
insert_all
/upsert_all
でunique_by
に指定された値と、columnに実際に指定されているunique indexの値の順序が一致しない場合に、自動でcolumnに指定されている順序と合わせるよう修正しています。