aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-11-02 17:49:37 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2009-11-02 17:50:12 -0800
commite93c2da14108c324ddf5f08f0165b342e028896f (patch)
treefd074c050053899fabdc13bc273764a197afd9e9 /activerecord
parent36a9644b86c53e322a891669cbdd2cf62cd648ac (diff)
downloadrails-e93c2da14108c324ddf5f08f0165b342e028896f.tar.gz
rails-e93c2da14108c324ddf5f08f0165b342e028896f.tar.bz2
rails-e93c2da14108c324ddf5f08f0165b342e028896f.zip
Arel::In -> Arel::Predicates::In
Diffstat (limited to 'activerecord')
-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?