aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-05-06 17:05:20 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-05-06 17:05:20 -0700
commit9073400253a10c20866879008c55dc1a39dbb400 (patch)
tree6023c2164331105e8580ca8da4aec2ba27b123f2 /activerecord/lib
parent2291d0be5c7bdebeaad1091ae13a5917ac6ba811 (diff)
parenta6bc35c82cd58aac61608391f38fda4e034be0f7 (diff)
downloadrails-9073400253a10c20866879008c55dc1a39dbb400.tar.gz
rails-9073400253a10c20866879008c55dc1a39dbb400.tar.bz2
rails-9073400253a10c20866879008c55dc1a39dbb400.zip
Merge pull request #10352 from zohlgren/fix_activerecord_sanitization_sanitize_sql_hash
Fix bug in ActiveRecord::Sanitization#sanitize_sql_hash_for_conditions
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/sanitization.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/sanitization.rb b/activerecord/lib/active_record/sanitization.rb
index 3c5b871e99..0ed97b66d6 100644
--- a/activerecord/lib/active_record/sanitization.rb
+++ b/activerecord/lib/active_record/sanitization.rb
@@ -89,7 +89,7 @@ module ActiveRecord
attrs = expand_hash_conditions_for_aggregates(attrs)
table = Arel::Table.new(table_name, arel_engine).alias(default_table_name)
- PredicateBuilder.build_from_hash(self.class, attrs, table).map { |b|
+ PredicateBuilder.build_from_hash(self, attrs, table).map { |b|
connection.visitor.accept b
}.join(' AND ')
end