提交 4fc49663 编写于 作者: C Carlos Antonio da Silva

Remove not used if..else clause

Related to #4614.
上级 e3f26f00
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册