Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 2f0ff7554dfc7c8b025822e5212065f256926734 1 parent 638e247
@tenderlove tenderlove authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/relation/predicate_builder.rb
View
2  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)
Please sign in to comment.
Something went wrong with that request. Please try again.