diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-10 22:17:44 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-10 22:17:44 +0100 |
commit | 84f6da45a19d335be320991cab44f492f61dc5c7 (patch) | |
tree | fcae699ac5cccf109ecc26d42bdbc039405f4501 /activerecord/lib/active_record/relation | |
parent | 07cf49aadf3195db6ddefc58932efc88a6704a09 (diff) | |
parent | 181c414baa877d748671d03fb09499c10f81ec02 (diff) | |
download | rails-84f6da45a19d335be320991cab44f492f61dc5c7.tar.gz rails-84f6da45a19d335be320991cab44f492f61dc5c7.tar.bz2 rails-84f6da45a19d335be320991cab44f492f61dc5c7.zip |
Merge branch 'master' of gitproxy:rails/rails
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index 65e5c0495c..49bf2fefe0 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -20,7 +20,9 @@ module ActiveRecord table = Arel::Table.new(table_name, :engine => @engine) end - attribute = table[column] || Arel::Attribute.new(table, column.to_sym) + # TODO : Arel::Table#[] should fallback to using Arel::Attribute if the table/column doesn't exist + # attribute = table[column] + attribute = Arel::Attribute.new(table, column.to_sym) case value when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope |