From 1644663ba7f678d178deab2bf1629dc05626f85b Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 17 Feb 2011 23:55:05 +0000 Subject: Split AssociationProxy into an Association class (and subclasses) which manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more. --- activerecord/lib/active_record/relation/predicate_builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/relation') diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index 65852cb281..9633fd3d82 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -21,7 +21,7 @@ module ActiveRecord when ActiveRecord::Relation value.select_values = [value.klass.arel_table['id']] if value.select_values.empty? attribute.in(value.arel.ast) - when Array, ActiveRecord::Associations::AssociationCollection + when Array, ActiveRecord::Associations::CollectionProxy values = value.to_a.map { |x| x.is_a?(ActiveRecord::Base) ? x.id : x } -- cgit v1.2.3