Permalink
Browse files

Disable prepared statements in the unprepared_statement block

  • Loading branch information...
1 parent 423f3b8 commit 8a0881813e275e5809028270b48e5eddf6587c8a @rafaelfranca rafaelfranca committed Sep 12, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -209,10 +209,11 @@ def unprepared_visitor
end
def unprepared_statement
- old, @visitor = @visitor, unprepared_visitor
+ old_prepared_statements, @prepared_statements = @prepared_statements, false
+ old_visitor, @visitor = @visitor, unprepared_visitor
yield
ensure
- @visitor = old
+ @visitor, @prepared_statements = old_visitor, old_prepared_statements
end
# Returns the human-readable name of the adapter. Use mixed case - one

0 comments on commit 8a08818

Please sign in to comment.