aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xactiverecord/lib/active_record/associations.rb2
-rw-r--r--activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb2
-rw-r--r--activerecord/lib/active_record/associations/has_many_association.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 0888c41396..03c8d4b3ed 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1724,7 +1724,7 @@ module ActiveRecord
if (ids_array = select_limited_ids_array(options, join_dependency)).empty?
throw :invalid_query
else
- Arel::In.new(
+ Arel::Predicates::In.new(
Arel::SqlLiteral.new("#{connection.quote_table_name table_name}.#{primary_key}"),
ids_array
)
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 4672b0723e..c646fe488b 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
@@ -84,7 +84,7 @@ module ActiveRecord
else
relation = arel_table(@reflection.options[:join_table])
relation.conditions(relation[@reflection.primary_key_name].eq(@owner.id).
- and(Arel::In.new(relation[@reflection.association_foreign_key], records.map(&:id)))
+ and(Arel::Predicates::In.new(relation[@reflection.association_foreign_key], records.map(&:id)))
).delete
end
end
diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb
index 29ba84ee37..cd31b0e211 100644
--- a/activerecord/lib/active_record/associations/has_many_association.rb
+++ b/activerecord/lib/active_record/associations/has_many_association.rb
@@ -71,7 +71,7 @@ module ActiveRecord
else
relation = arel_table(@reflection.table_name)
relation.conditions(relation[@reflection.primary_key_name].eq(@owner.id).
- and(Arel::In.new(relation[@reflection.klass.primary_key], records.map(&:id)))
+ and(Arel::Predicates::In.new(relation[@reflection.klass.primary_key], records.map(&:id)))
).update(relation[@reflection.primary_key_name] => nil)
@owner.class.update_counters(@owner.id, cached_counter_attribute_name => -records.size) if has_cached_counter?