Permalink
Browse files

sqlite3 tests passing again

  • Loading branch information...
1 parent 8522365 commit f6d46d9c2c4d4d0f49600c77d16f349ed95d408f @tenderlove tenderlove committed Apr 9, 2014
Showing with 8 additions and 7 deletions.
  1. +8 −7 activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
@@ -141,21 +141,22 @@ def initialize(connection, logger, config)
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

0 comments on commit f6d46d9

Please sign in to comment.