From e08c153a08a0af79b36853c0ad8bb6e916ca3e66 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Wed, 10 Mar 2010 18:30:09 -0300 Subject: Arel now fallback to using Arel::Attribute if the table/column doesn't exists. [#4142 state:committed] Signed-off-by: Jeremy Kemper --- activerecord/lib/active_record/relation/predicate_builder.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index 49bf2fefe0..7e83eccbb5 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -20,9 +20,7 @@ module ActiveRecord table = Arel::Table.new(table_name, :engine => @engine) end - # TODO : Arel::Table#[] should fallback to using Arel::Attribute if the table/column doesn't exist - # attribute = table[column] - attribute = Arel::Attribute.new(table, column.to_sym) + attribute = table[column] case value when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope -- cgit v1.2.3