aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-01-10 13:08:25 -0700
committerSean Griffin <sean@thoughtbot.com>2015-01-10 15:45:46 -0700
commit0b4fd69b8b2f0f169899978fd260459c16a82030 (patch)
treef97a471e69948393d90099a1f2204c9363ca9edc /activerecord/lib
parenta00854e51549460c5a865c7ba9ee02a442b917c5 (diff)
downloadrails-0b4fd69b8b2f0f169899978fd260459c16a82030.tar.gz
rails-0b4fd69b8b2f0f169899978fd260459c16a82030.tar.bz2
rails-0b4fd69b8b2f0f169899978fd260459c16a82030.zip
Stop passing a column to `quote` when executing from a statement cache
I'm planning on deprecating the column argument to mirror the deprecation in [arel]. [arel]: https://github.com/rails/arel/commit/6160bfbda1d1781c3b08a33ec4955f170e95be11
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/statement_cache.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/statement_cache.rb b/activerecord/lib/active_record/statement_cache.rb
index 192a19f05d..3047a81ec4 100644
--- a/activerecord/lib/active_record/statement_cache.rb
+++ b/activerecord/lib/active_record/statement_cache.rb
@@ -47,8 +47,8 @@ module ActiveRecord
def sql_for(binds, connection)
val = @values.dup
- binds = binds.dup
- @indexes.each { |i| val[i] = connection.quote(*binds.shift.reverse) }
+ binds = connection.prepare_binds_for_database(binds)
+ @indexes.each { |i| val[i] = connection.quote(binds.shift.last) }
val.join
end
end