mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
symbol to proc is slow, we should avoid it
This commit is contained in:
committed by
Xavier Noria
parent
17a6dfb745
commit
5baf75b650
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user