Arel now fallback to using Arel::Attribute if the table/column doesn't exists.

[#4142 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
Emilio Tagua 2010-03-10 18:30:09 -03:00 committed by Jeremy Kemper
parent aad432a9e9
commit e08c153a08
1 changed files with 1 additions and 3 deletions

View File

@ -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