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:59:06 -0800 |
commit | 2f0ff7554dfc7c8b025822e5212065f256926734 (patch) | |
tree | f63272948f03264a2707d028b88ffea410671f8b /activerecord/lib/active_record | |
parent | 638e24796013282735543823cb71e58c76819060 (diff) | |
download | rails-2f0ff7554dfc7c8b025822e5212065f256926734.tar.gz rails-2f0ff7554dfc7c8b025822e5212065f256926734.tar.bz2 rails-2f0ff7554dfc7c8b025822e5212065f256926734.zip |
fixing call to columns hash. run the damn tests when you backport!
Diffstat (limited to 'activerecord/lib/active_record')
-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) |