mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Document uses_transaction
[ci-skip]
Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
This commit is contained in:
parent
dbb065dba9
commit
f17262839a
1 changed files with 3 additions and 0 deletions
|
@ -67,6 +67,9 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
# Prevents automatically wrapping each specified test in a transaction,
|
||||
# to allow application logic transactions to be tested in a top-level
|
||||
# (non-nested) context.
|
||||
def uses_transaction(*methods)
|
||||
@uses_transaction = [] unless defined?(@uses_transaction)
|
||||
@uses_transaction.concat methods.map(&:to_s)
|
||||
|
|
Loading…
Reference in a new issue