aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-08-13 12:30:58 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-08-13 12:37:03 -0700
commit4439e57ee09cf7b01fb1ef956626e6bfb6cb5fa7 (patch)
treeac3371fc470b05aae797bf12c5544e1989a97a5c /activerecord
parent5651e4c835a4a902c9fb7dea71be48a93e0d0eca (diff)
downloadrails-4439e57ee09cf7b01fb1ef956626e6bfb6cb5fa7.tar.gz
rails-4439e57ee09cf7b01fb1ef956626e6bfb6cb5fa7.tar.bz2
rails-4439e57ee09cf7b01fb1ef956626e6bfb6cb5fa7.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.rb2
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