mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
to_sym stuff before passing it to arel
This commit is contained in:
@@ -913,7 +913,7 @@ module ActiveRecord #:nodoc:
|
||||
end
|
||||
|
||||
def type_condition
|
||||
sti_column = arel_table[inheritance_column]
|
||||
sti_column = arel_table[inheritance_column.to_sym]
|
||||
condition = sti_column.eq(sti_name)
|
||||
descendants.each { |subclass| condition = condition.or(sti_column.eq(subclass.sti_name)) }
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ module ActiveRecord
|
||||
table = Arel::Table.new(table_name, :engine => engine)
|
||||
end
|
||||
|
||||
attribute = table[column] || Arel::Attribute.new(table, column)
|
||||
attribute = table[column.to_sym] || Arel::Attribute.new(table, column)
|
||||
|
||||
case value
|
||||
when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::Relation
|
||||
|
||||
Reference in New Issue
Block a user