From dedecd0b44ac84af3c7b6ff2ab29b811054bf771 Mon Sep 17 00:00:00 2001 From: Potapov Sergey Date: Fri, 6 Dec 2013 17:18:39 +0200 Subject: [PATCH] Use respond_to? with true to check inspect private/protected methods --- lib/database_cleaner/active_record/transaction.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/database_cleaner/active_record/transaction.rb b/lib/database_cleaner/active_record/transaction.rb index 551485c..bc7696e 100644 --- a/lib/database_cleaner/active_record/transaction.rb +++ b/lib/database_cleaner/active_record/transaction.rb @@ -36,7 +36,7 @@ module DatabaseCleaner::ActiveRecord end # The below is for handling after_commit hooks.. see https://github.com/bmabey/database_cleaner/issues/99 - if connection_class.connection.respond_to?(:rollback_transaction_records) + if connection_class.connection.respond_to?(:rollback_transaction_records, true) connection_class.connection.send(:rollback_transaction_records, true) end