Merge pull request #201 from mshibuya/fix-transaction-strategy-in-rails4.0.0.rc1

Fix for transaction strategy problem in Rails4 rc1
This commit is contained in:
Ben Mabey 2013-05-03 07:44:33 -07:00
commit ce1d162989

View file

@ -9,7 +9,7 @@ module DatabaseCleaner::ActiveRecord
def start
# Hack to make sure that the connection is properly setup for
# the clean code.
connection_class.connection.transaction
connection_class.connection.transaction{ }
if connection_maintains_transaction_count?
if connection_class.connection.respond_to?(:increment_open_transactions)