From 6c50ad0234f4521d77a5efcc295d418d529b924f Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 13 Aug 2010 12:30:58 -0700 Subject: [PATCH] do not use arel constants directly --- .../associations/has_and_belongs_to_many_association.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb index 2838528a0c..be68affb3e 100644 --- a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +++ b/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 -- GitLab