mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #4620 from carlosantoniodasilva/counter-cache-old-code
Remove not used if..else clause
This commit is contained in:
commit
e407eb3d02
1 changed files with 0 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue