From 8b1b273c21a2f1a6eeccca5fbe0303679c2d707d Mon Sep 17 00:00:00 2001 From: Cezary Baginski Date: Sat, 1 May 2010 19:21:31 +0200 Subject: [PATCH] AR: fixed postgres transaction tests [#4519 state:commited] Signed-off-by: Jeremy Kemper --- .../connection_adapters/postgresql_adapter.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 74fed4ad62263..6389094b8a981 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -490,12 +490,8 @@ def rollback_db_transaction execute "ROLLBACK" end - if defined?(PGconn::PQTRANS_IDLE) - # The ruby-pg driver supports inspecting the transaction status, - # while the ruby-postgres driver does not. - def outside_transaction? - @connection.transaction_status == PGconn::PQTRANS_IDLE - end + def outside_transaction? + @connection.transaction_status == PGconn::PQTRANS_IDLE end def create_savepoint