diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-23 09:08:01 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-23 09:08:01 -0800 |
commit | e407eb3d026089df796d9f53f7ced74e5510d939 (patch) | |
tree | 46d540b970103ca03bdf76cfeb93fed9de0ab145 | |
parent | e3f26f00486354d58b6c069747d02c236546949f (diff) | |
parent | 4fc49663f52c2e93dc0a001263abe7ab253b4d7c (diff) | |
download | rails-e407eb3d026089df796d9f53f7ced74e5510d939.tar.gz rails-e407eb3d026089df796d9f53f7ced74e5510d939.tar.bz2 rails-e407eb3d026089df796d9f53f7ced74e5510d939.zip |
Merge pull request #4620 from carlosantoniodasilva/counter-cache-old-code
Remove not used if..else clause
-rw-r--r-- | activerecord/lib/active_record/counter_cache.rb | 6 |
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) |