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.
Not all adapters supports transaction state introspection. Currently, only the PostgreSQL adapter supports this.
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 112 def outside_transaction? nil end