2023/06/08分のコミットです。
CHANGELOGへの追加はありませんでした。
Merge pull request #48414 from jhawthorn/faster_block_expr
actionview/lib/action_view/template/handlers/erb/erubi.rb
の修正です。
ERBのパースでblock処理を取得する為の正規表現から不要な数量詞の指定を削除しています。性能改善の為。
Merge pull request #48416 from Shopify/fix-has-one-deletion
activerecord/lib/active_record/associations/has_one_association.rb
、
activerecord/lib/active_record/associations/singular_association.rb
の修正です。
Revert "Small refactor on build singular association"でRevertされた、Small refactor on build singular associationを再度commit + has_one
+ dependent: :destroy
+ uniqueness: true
が指定された場合のテストを追加しています。
既存の挙動が変わってしまった為一旦Revertされたのですが、変更後の挙動の方が正しいだろう、という事でテストを追加し再度コミットしています。この対応により、has_one
+ dependent: :destroy
+ uniqueness: true
が指定されたassociationを複数回作成しようとした場合にエラー(ActiveRecord::RecordNotUnique
)になっていたのが、エラーにならず、単純に古いrecordを新しいrecordで置き換えるようになっています。