Skip to content

Commit

Permalink
Arel::Table#[] always returns an attribute, so no need for ||
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Dec 23, 2010
1 parent 35f5938 commit 83ffb82
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 83ffb82

Please sign in to comment.