diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-02-09 16:54:48 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-02-09 16:54:48 -0800 |
commit | d29235d2a4df94b6db7d3e45ab15a6799363384e (patch) | |
tree | 634340de2244275fbc4459c9b680382384e1c188 /activerecord | |
parent | 697f31cbe76539670b582b624cc3a3beb92eb362 (diff) | |
download | rails-d29235d2a4df94b6db7d3e45ab15a6799363384e.tar.gz rails-d29235d2a4df94b6db7d3e45ab15a6799363384e.tar.bz2 rails-d29235d2a4df94b6db7d3e45ab15a6799363384e.zip |
fixing call to columns hash. run the damn tests when you backport!
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 5f311ed6d4..236fd5cdfd 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -53,7 +53,7 @@ module ActiveRecord attribute.eq(value.name) when Integer, ActiveSupport::Duration # Arel treats integers as literals, but they should be quoted when compared with strings - column = engine.connection.schema_cache.columns_hash(table.name)[attribute.name.to_s] + column = engine.connection.schema_cache.columns_hash[table.name][attribute.name.to_s] attribute.eq(Arel::Nodes::SqlLiteral.new(engine.connection.quote(value, column))) else attribute.eq(value) |