removing references to arel constants

This commit is contained in:
Aaron Patterson
2010-08-13 12:33:54 -07:00
committed by Xavier Noria
parent d6c84845b3
commit c8d5ee3e9e

View File

@@ -76,7 +76,7 @@ module ActiveRecord
else
relation = Arel::Table.new(@reflection.table_name)
relation.where(relation[@reflection.primary_key_name].eq(@owner.id).
and(Arel::Predicates::In.new(relation[@reflection.klass.primary_key], records.map { |r| r.id }))
and(relation[@reflection.klass.primary_key].in(records.map { |r| r.id }))
).update(relation[@reflection.primary_key_name] => nil)
@owner.class.update_counters(@owner.id, cached_counter_attribute_name => -records.size) if has_cached_counter?