diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-10 13:07:40 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-10 15:45:46 -0700 |
commit | a00854e51549460c5a865c7ba9ee02a442b917c5 (patch) | |
tree | 966719709c36efcf8646c4b9d11a634c039bf55c /activerecord | |
parent | e6ac56a848eb253a2162d7b18ad6380af22971bd (diff) | |
download | rails-a00854e51549460c5a865c7ba9ee02a442b917c5.tar.gz rails-a00854e51549460c5a865c7ba9ee02a442b917c5.tar.bz2 rails-a00854e51549460c5a865c7ba9ee02a442b917c5.zip |
Stop passing a column to `quote` in `Relation#to_sql`
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')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index ab3debc03b..dd78814c6a 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -558,8 +558,9 @@ module ActiveRecord end arel = relation.arel - binds = (arel.bind_values + relation.bind_values).dup - binds.map! { |bv| connection.quote(*bv.reverse) } + binds = arel.bind_values + relation.bind_values + binds = connection.prepare_binds_for_database(binds) + binds.map! { |_, value| connection.quote(value) } collect = visitor.accept(arel.ast, Arel::Collectors::Bind.new) collect.substitute_binds(binds).join end |