diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-09 15:52:06 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-09 15:52:06 -0700 |
commit | f6d46d9c2c4d4d0f49600c77d16f349ed95d408f (patch) | |
tree | c203405e16581f74d2069e4d9aead12347600886 /activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb | |
parent | 85223653ebcfa1f9bd05126160c3c1676527e83c (diff) | |
download | rails-f6d46d9c2c4d4d0f49600c77d16f349ed95d408f.tar.gz rails-f6d46d9c2c4d4d0f49600c77d16f349ed95d408f.tar.bz2 rails-f6d46d9c2c4d4d0f49600c77d16f349ed95d408f.zip |
sqlite3 tests passing again
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index ef4b45cd43..042bf49145 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -141,21 +141,22 @@ module ActiveRecord end class BindCollector < Arel::Collectors::Bind - def initialize(conn) - @conn = conn - super() + def compile(bvs, conn) + super(bvs.map { |bv| conn.quote(*bv.reverse) }) end + end - def compile(bvs) - super(bvs.map { |bv| @conn.quote(*bv.reverse) }) + class SQLString < Arel::Collectors::SQLString + def compile(bvs, conn) + super(bvs) end end def collector if @prepared_statements - Arel::Collectors::SQLString.new + SQLString.new else - BindCollector.new self + BindCollector.new end end |