diff options
author | Cezary Baginski <cezary.baginski@gmail.com> | 2010-05-01 19:21:31 +0200 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-05-01 13:40:07 -0700 |
commit | 8b1b273c21a2f1a6eeccca5fbe0303679c2d707d (patch) | |
tree | b407efbb2549e107e47fc8f46510e99a17663d5d /activerecord/lib/active_record/connection_adapters | |
parent | a61a6d206b1d37747c3f907487db4bc0952c7b5a (diff) | |
download | rails-8b1b273c21a2f1a6eeccca5fbe0303679c2d707d.tar.gz rails-8b1b273c21a2f1a6eeccca5fbe0303679c2d707d.tar.bz2 rails-8b1b273c21a2f1a6eeccca5fbe0303679c2d707d.zip |
AR: fixed postgres transaction tests [#4519 state:commited]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 8 |
1 files 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 74fed4ad62..6389094b8a 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 @@ module ActiveRecord 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 |