diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-03-10 18:30:09 -0300 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-10 13:49:11 -0800 |
commit | e08c153a08a0af79b36853c0ad8bb6e916ca3e66 (patch) | |
tree | 06695bb97433d7ff441f8239f8c288c2483fab84 /activerecord/lib | |
parent | aad432a9e91d991218276b5945d43e9dcb247b63 (diff) | |
download | rails-e08c153a08a0af79b36853c0ad8bb6e916ca3e66.tar.gz rails-e08c153a08a0af79b36853c0ad8bb6e916ca3e66.tar.bz2 rails-e08c153a08a0af79b36853c0ad8bb6e916ca3e66.zip |
Arel now fallback to using Arel::Attribute if the table/column doesn't exists.
[#4142 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index 49bf2fefe0..7e83eccbb5 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -20,9 +20,7 @@ module ActiveRecord table = Arel::Table.new(table_name, :engine => @engine) end - # 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) + attribute = table[column] case value when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope |