The newer versions of postgres provide the method transaction_status. original file activerecord-2.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb
[Source]
# File lib/pg_overrides.rb, line 19 19: def transaction_active? 20: 0 21: end
[Validate]