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

do not use arel constants directly

上级 5baf75b6
......@@ -79,7 +79,7 @@ def delete_records(records)
else
relation = Arel::Table.new(@reflection.options[:join_table])
relation.where(relation[@reflection.primary_key_name].eq(@owner.id).
and(Arel::Predicates::In.new(relation[@reflection.association_foreign_key], records.map { |x| x.id }))
and(relation[@reflection.association_foreign_key].in(records.map { |x| x.id }))
).delete
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册