aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-12-10 14:48:12 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2008-12-10 14:48:12 -0800
commitb30ae1974851b20ef430df9de17e6e79e5b25ad2 (patch)
tree160b26560998d5b7f9ed7148a4779e6af1b847a5 /activerecord/lib
parent96b815d7e81b9cef912ef94c96dca923fe43b0ba (diff)
downloadrails-b30ae1974851b20ef430df9de17e6e79e5b25ad2.tar.gz
rails-b30ae1974851b20ef430df9de17e6e79e5b25ad2.tar.bz2
rails-b30ae1974851b20ef430df9de17e6e79e5b25ad2.zip
Revert "Fix: counter_cache should decrement on deleting associated records."
[#1196 state:open] This reverts commit 05f2183747c8e75c9e8bbaadb9573b4bdf41ecfc.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations/association_collection.rb3
1 files changed, 0 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb
index 0ad58010b2..0ff91fbdf8 100644
--- a/activerecord/lib/active_record/associations/association_collection.rb
+++ b/activerecord/lib/active_record/associations/association_collection.rb
@@ -202,9 +202,6 @@ module ActiveRecord
records.each do |record|
@target.delete(record)
- if respond_to?(:cached_counter_attribute_name) && @owner[cached_counter_attribute_name]
- @owner.class.decrement_counter(cached_counter_attribute_name, @owner.send(@owner.class.primary_key))
- end
callback(:after_remove, record)
end
end