From 2f0ff7554dfc7c8b025822e5212065f256926734 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sat, 9 Feb 2013 16:54:48 -0800 Subject: fixing call to columns hash. run the damn tests when you backport! --- activerecord/lib/active_record/relation/predicate_builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') 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) -- cgit v1.2.3