aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
diff options
context:
space:
mode:
authorCezary Baginski <cezary.baginski@gmail.com>2010-05-01 19:21:31 +0200
committerJeremy Kemper <jeremy@bitsweat.net>2010-05-01 13:40:07 -0700
commit8b1b273c21a2f1a6eeccca5fbe0303679c2d707d (patch)
treeb407efbb2549e107e47fc8f46510e99a17663d5d /activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
parenta61a6d206b1d37747c3f907487db4bc0952c7b5a (diff)
downloadrails-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/postgresql_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb8
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