From 008f3da3835e47f719ba6820703ba404ff363640 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Sat, 16 Aug 2014 22:55:01 -0700 Subject: Don't expose these new APIs yet (added in 877ea78 / #16189) WARNING: don't use them! They might change or go away between future beta/RC/ patch releases! Also added a CHANGELOG entry for this. --- activerecord/CHANGELOG.md | 5 +++++ activerecord/lib/active_record/associations/has_many_association.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 02660ae4c2..495e9c77d7 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,8 @@ +* `*_was` and `changes` now work correctly for in-place attribute changes as + well. + + *Sean Griffin* + * Fix regression on after_commit that didnt fire when having nested transactions. Fixes #16425 diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index cf59699228..1413efaf7f 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -103,7 +103,7 @@ module ActiveRecord if has_cached_counter?(reflection) counter = cached_counter_attribute_name(reflection) owner[counter] += difference - owner.clear_attribute_changes([counter]) # eww + owner.send(:clear_attribute_changes, counter) # eww end end -- cgit v1.2.3