提交 c8d5ee3e 编写于 作者: A Aaron Patterson 提交者: Xavier Noria

removing references to arel constants

上级 d6c84845
......@@ -76,7 +76,7 @@ def delete_records(records)
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?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册