aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/counter_cache.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-07-24 13:31:28 -0400
committerGitHub <noreply@github.com>2017-07-24 13:31:28 -0400
commitdd58cc2ebb9cc0f4f4db50a1a6d3296ad9a6a8e2 (patch)
treec010db36f87f3cd3720c53877c158b8549e408cb /activerecord/lib/active_record/counter_cache.rb
parent501941b10828f274135ec974814ed815e4ffcffa (diff)
parent6137a4e8f77f0bba78d304d962b89ddf3cf465aa (diff)
downloadrails-dd58cc2ebb9cc0f4f4db50a1a6d3296ad9a6a8e2.tar.gz
rails-dd58cc2ebb9cc0f4f4db50a1a6d3296ad9a6a8e2.tar.bz2
rails-dd58cc2ebb9cc0f4f4db50a1a6d3296ad9a6a8e2.zip
Merge pull request #29765 from lugray/fix_counter_cache
Fix `counter_cache` double increment
Diffstat (limited to 'activerecord/lib/active_record/counter_cache.rb')
-rw-r--r--activerecord/lib/active_record/counter_cache.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/counter_cache.rb b/activerecord/lib/active_record/counter_cache.rb
index ab2bfb63a6..5005d58f1c 100644
--- a/activerecord/lib/active_record/counter_cache.rb
+++ b/activerecord/lib/active_record/counter_cache.rb
@@ -182,7 +182,6 @@ module ActiveRecord
each_counter_cached_associations do |association|
if send(association.reflection.name)
association.increment_counters
- @_after_create_counter_called = true
end
end