method

outside_transaction?

rails latest stable - Class: ActiveRecord::ConnectionAdapters::DatabaseStatements

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

outside_transaction?()
public

Checks whether there is currently no transaction active. This is done by querying the database driver, and does not use the transaction house-keeping information recorded by #increment_open_transactions and friends.

Returns true if there is no transaction active, false if there is a transaction active, and nil if this information is unknown.

Not all adapters supports transaction state introspection. Currently, only the PostgreSQL adapter supports this.