mirror of https://github.com/rails/rails
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:
parent
aad432a9e9
commit
e08c153a08
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue