Skip to content
Browse files

Merge pull request #4620 from carlosantoniodasilva/counter-cache-old-…

…code

Remove not used if..else clause
  • Loading branch information...
2 parents e3f26f0 + 4fc4966 commit e407eb3d026089df796d9f53f7ced74e5510d939 @tenderlove tenderlove committed
Showing with 0 additions and 6 deletions.
  1. +0 −6 activerecord/lib/active_record/counter_cache.rb
View
6 activerecord/lib/active_record/counter_cache.rb
@@ -19,12 +19,6 @@ def reset_counters(id, *counters)
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)

0 comments on commit e407eb3

Please sign in to comment.
Something went wrong with that request. Please try again.