Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove deprecated `PostgreSQLAdapter#outside_transaction?` method.

  • Loading branch information...
commit fca29750e40e9499aa6fb6de4fa3d2d972d5a4d5 1 parent efb6c16
@senny senny authored
View
5 activerecord/CHANGELOG.md
@@ -1,3 +1,8 @@
+* Remove deprecated `PostgreSQLAdapter#outside_transaction?`
+ method. You can use `#transaction_open?` instead.
+
+ *Yves Senn*
+
* Remove deprecated `ActiveRecord::Fixtures.find_table_name` in favor of
`ActiveRecord::Fixtures.default_fixture_model_name`.
View
7 activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
@@ -218,13 +218,6 @@ def rollback_db_transaction
execute "ROLLBACK"
end
- def outside_transaction?
- message = "#outside_transaction? is deprecated. This method was only really used " \
- "internally, but you can use #transaction_open? instead."
- ActiveSupport::Deprecation.warn message
- @connection.transaction_status == PGconn::PQTRANS_IDLE
- end
-
def create_savepoint
execute("SAVEPOINT #{current_savepoint_name}")
end
View
10 activerecord/test/cases/transactions_test.rb
@@ -410,16 +410,6 @@ def test_restore_active_record_state_for_all_records_in_a_transaction
assert !@second.destroyed?, 'not destroyed'
end
- if current_adapter?(:PostgreSQLAdapter) && defined?(PGconn::PQTRANS_IDLE)
- def test_outside_transaction_works
- assert assert_deprecated { Topic.connection.outside_transaction? }
- Topic.connection.begin_db_transaction
- assert assert_deprecated { !Topic.connection.outside_transaction? }
- Topic.connection.rollback_db_transaction
- assert assert_deprecated { Topic.connection.outside_transaction? }
- end
- end
-
def test_sqlite_add_column_in_transaction
return true unless current_adapter?(:SQLite3Adapter)
Please sign in to comment.
Something went wrong with that request. Please try again.