提交 83ffb82f 编写于 作者: A Aaron Patterson

Arel::Table#[] always returns an attribute, so no need for ||

上级 35f5938c
......@@ -15,7 +15,7 @@ def self.build_from_hash(engine, attributes, default_table)
table = Arel::Table.new(table_name, :engine => engine)
end
attribute = table[column.to_sym] || Arel::Attribute.new(table, column)
attribute = table[column.to_sym]
case value
when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::Relation
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册