mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
do not pass nil values to arel
This commit is contained in:
@@ -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(relation[@reflection.association_foreign_key].in(records.map { |x| x.id }))
|
||||
and(relation[@reflection.association_foreign_key].in(records.map { |x| x.id }.compact))
|
||||
).delete
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user