2018/05/27分のコミットです。
CHANGELOGへの追加はありませんでした。
Fix belongs_to_counter_cache_after_update
to respect polymorphic type change
Active Recordの修正です。
polymorphic association + counter cacheを使用している場合に、polymorphicのtypeを変更した場合にcounter cacheの更新が正しく行われないバグがあったのを修正しています。
Fix inconsistent touching behavior between assigning and unassigning
activerecord/lib/active_record/associations/belongs_to_association.rb
、
activerecord/lib/active_record/associations/builder/belongs_to.rb
の修正です。
belongs_to
associationにtouch
オプションを指定している、かつ、associationのオブジェクトを変更した場合に、変更元のオブジェクトはtouchされて変更後のオブジェクトをはtouchされない、という挙動になっていたのを、どちらもtouch処理が行われるよう修正しています。
Fix that association's after_touch is not called with counter cache
activerecord/lib/active_record/callbacks.rb
の修正です。
counter cacheを使用している場合に、associationのafter_touch
callbackが実行されないバグがあったのを修正しています。