method
outside_transaction?
v3.0.9 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::DatabaseStatements
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.