From 4fc49663f52c2e93dc0a001263abe7ab253b4d7c Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Mon, 23 Jan 2012 15:04:25 -0200 Subject: Remove not used if..else clause Related to #4614. --- activerecord/lib/active_record/counter_cache.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/activerecord/lib/active_record/counter_cache.rb b/activerecord/lib/active_record/counter_cache.rb index ee0b0c7fab..224f5276eb 100644 --- a/activerecord/lib/active_record/counter_cache.rb +++ b/activerecord/lib/active_record/counter_cache.rb @@ -19,12 +19,6 @@ module ActiveRecord counters.each do |association| has_many_association = reflect_on_association(association.to_sym) - if has_many_association.options[:as] - has_many_association.options[:as].to_s.classify - else - self.name - end - foreign_key = has_many_association.foreign_key.to_s child_class = has_many_association.klass belongs_to = child_class.reflect_on_all_associations(:belongs_to) -- cgit v1.2.3