mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
removing references to arel constants
This commit is contained in:
committed by
Xavier Noria
parent
d6c84845b3
commit
c8d5ee3e9e
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user