提交 34db2b7c 编写于 作者: E eileencodes

remove count var

this change was unneccsary as nothing was gained from it
上级 05a90c36
......@@ -121,13 +121,11 @@ def delete_or_nullify_all_records(method)
# Deletes the records according to the <tt>:dependent</tt> option.
def delete_records(records, method)
if method == :destroy
count = records.length
records.each(&:destroy!)
update_counter(-count) unless inverse_updates_counter_cache?
update_counter(-records.length) unless inverse_updates_counter_cache?
else
scope = self.scope.where(reflection.klass.primary_key => records)
count = delete_count(method, scope)
update_counter(-count)
update_counter(-delete_count(method, scope))
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册