aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-23 15:04:25 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-23 15:04:26 -0200
commit4fc49663f52c2e93dc0a001263abe7ab253b4d7c (patch)
tree46d540b970103ca03bdf76cfeb93fed9de0ab145
parente3f26f00486354d58b6c069747d02c236546949f (diff)
downloadrails-4fc49663f52c2e93dc0a001263abe7ab253b4d7c.tar.gz
rails-4fc49663f52c2e93dc0a001263abe7ab253b4d7c.tar.bz2
rails-4fc49663f52c2e93dc0a001263abe7ab253b4d7c.zip
Remove not used if..else clause
Related to #4614.
-rw-r--r--activerecord/lib/active_record/counter_cache.rb6
1 files changed, 0 insertions, 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)