mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix scope loading issue when the table doesn't exist
This commit is contained in:
parent
dcd110c724
commit
181c414baa
1 changed files with 3 additions and 1 deletions
|
@ -20,7 +20,9 @@ module ActiveRecord
|
|||
table = Arel::Table.new(table_name, :engine => @engine)
|
||||
end
|
||||
|
||||
attribute = table[column] || Arel::Attribute.new(table, column.to_sym)
|
||||
# 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)
|
||||
|
||||
case value
|
||||
when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope
|
||||
|
|
Loading…
Reference in a new issue