Skip to content
Browse files

do not use arel constants directly

  • Loading branch information...
1 parent fb6edb1 commit abd973689d3446dccbd39891a906440c35b06535 @tenderlove tenderlove committed Aug 13, 2010
View
2 activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
@@ -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

0 comments on commit abd9736

Please sign in to comment.
Something went wrong with that request. Please try again.