mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Arel::In -> Arel::Predicates::In
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user