symbol to proc is slow, we should avoid it

This commit is contained in:
Aaron Patterson
2010-08-13 12:28:41 -07:00
committed by Xavier Noria
parent 17a6dfb745
commit 5baf75b650

View File

@@ -79,7 +79,7 @@ module ActiveRecord
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(&:id)))
and(Arel::Predicates::In.new(relation[@reflection.association_foreign_key], records.map { |x| x.id }))
).delete
end
end