diff options
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index 478d2cb597..08840d102a 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -20,7 +20,7 @@ module ActiveRecord arel_table = Arel::Table.new(table_name, @engine) end - attribute = Arel::Attribute.new(arel_table, column.to_sym) + attribute = arel_table[column] || Arel::Attribute.new(arel_table, column.to_sym) case value when Array, Range, ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope |