Permalink
Browse files

fixing call to columns hash. run the damn tests when you backport!

  • Loading branch information...
1 parent 638e247 commit 2f0ff7554dfc7c8b025822e5212065f256926734 @tenderlove tenderlove committed Feb 10, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/relation/predicate_builder.rb
@@ -53,7 +53,7 @@ def self.build_from_hash(engine, attributes, default_table, allow_table_name = t
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)

0 comments on commit 2f0ff75

Please sign in to comment.