instance method
outside_transaction?
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v3.2.22.5Signature
outside_transaction?()
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.
Source
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 67
def outside_transaction?
nil
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb line 67
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::DatabaseStatements