diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-22 19:17:44 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-22 19:17:44 -0800 |
commit | 83ffb82fb9f53e1c90d3b598067494a12258b605 (patch) | |
tree | 475b5bd803c0eb34f6c24d8b6c1c50d4ba8189a4 /activerecord | |
parent | 35f5938c9128718a2c5515524c815def75a53f00 (diff) | |
download | rails-83ffb82fb9f53e1c90d3b598067494a12258b605.tar.gz rails-83ffb82fb9f53e1c90d3b598067494a12258b605.tar.bz2 rails-83ffb82fb9f53e1c90d3b598067494a12258b605.zip |
Arel::Table#[] always returns an attribute, so no need for ||
Diffstat (limited to 'activerecord')
-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 d748eebc41..6760d65186 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -15,7 +15,7 @@ module ActiveRecord 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 |