From e93c2da14108c324ddf5f08f0165b342e028896f Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 2 Nov 2009 17:49:37 -0800 Subject: Arel::In -> Arel::Predicates::In --- activerecord/lib/active_record/associations.rb | 2 +- .../active_record/associations/has_and_belongs_to_many_association.rb | 2 +- activerecord/lib/active_record/associations/has_many_association.rb | 2 +- 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? -- cgit v1.2.3