Permalink
Browse files

symbol to proc is slow, we should avoid it

  • Loading branch information...
1 parent e428300 commit fb6edb1769229fff66bf23a7c2e9d52cf26359c8 @tenderlove tenderlove committed Aug 13, 2010
@@ -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(&:id)))
+ and(Arel::Predicates::In.new(relation[@reflection.association_foreign_key], records.map { |x| x.id }))
).delete
end
end

0 comments on commit fb6edb1

Please sign in to comment.