diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-13 12:30:58 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-14 13:17:30 +0200 |
commit | 6c50ad0234f4521d77a5efcc295d418d529b924f (patch) | |
tree | 058da8dfa7e10597bd5c2658ee9c331690ccc8d7 /activerecord | |
parent | 5baf75b650aafc3cada246e2e0308684cc8461ca (diff) | |
download | rails-6c50ad0234f4521d77a5efcc295d418d529b924f.tar.gz rails-6c50ad0234f4521d77a5efcc295d418d529b924f.tar.bz2 rails-6c50ad0234f4521d77a5efcc295d418d529b924f.zip |
do not use arel constants directly
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ 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 { |x| x.id })) + and(relation[@reflection.association_foreign_key].in(records.map { |x| x.id })) ).delete end end |