diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/transactions.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb index 3b6835762c..b014ab757d 100644 --- a/activerecord/lib/active_record/transactions.rb +++ b/activerecord/lib/active_record/transactions.rb @@ -66,12 +66,15 @@ module ActiveRecord # will happen under the protected cover of a transaction. So you can use validations to check for values that the transaction # depends on or you can raise exceptions in the callbacks to rollback. # - # == Exception handling + # == Exception handling and rolling back # # Also have in mind that exceptions thrown within a transaction block will be propagated (after triggering the ROLLBACK), so you - # should be ready to catch those in your application code. One exception is the ActiveRecord::Rollback exception, which will - # trigger a ROLLBACK when raised, but not be re-raised by the transaction block. + # should be ready to catch those in your application code. + # + # One exception is the ActiveRecord::Rollback exception, which will trigger a ROLLBACK when raised, + # but not be re-raised by the transaction block. module ClassMethods + # See ActiveRecord::Transactions::ClassMethods for detailed documentation. def transaction(&block) increment_open_transactions |