diff options
author | wycats <wycats@gmail.com> | 2010-03-10 13:28:52 -0800 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-10 13:28:52 -0800 |
commit | 4745b53bcda400cf2e8cb4f2c0bf068f6d13c0e5 (patch) | |
tree | 6f080f704435d22dbfee6ffd454529c12e5bb505 /activerecord | |
parent | 7b622786fcc5046a06989ec7a3cbf46f92e04dea (diff) | |
parent | 84f6da45a19d335be320991cab44f492f61dc5c7 (diff) | |
download | rails-4745b53bcda400cf2e8cb4f2c0bf068f6d13c0e5.tar.gz rails-4745b53bcda400cf2e8cb4f2c0bf068f6d13c0e5.tar.bz2 rails-4745b53bcda400cf2e8cb4f2c0bf068f6d13c0e5.zip |
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'activerecord')
-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 |