aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-04-09 15:52:06 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-04-09 15:52:06 -0700
commitf6d46d9c2c4d4d0f49600c77d16f349ed95d408f (patch)
treec203405e16581f74d2069e4d9aead12347600886
parent85223653ebcfa1f9bd05126160c3c1676527e83c (diff)
downloadrails-f6d46d9c2c4d4d0f49600c77d16f349ed95d408f.tar.gz
rails-f6d46d9c2c4d4d0f49600c77d16f349ed95d408f.tar.bz2
rails-f6d46d9c2c4d4d0f49600c77d16f349ed95d408f.zip
sqlite3 tests passing again
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb15
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