diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-07-19 12:19:56 +0200 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-07-19 12:19:56 +0200 |
commit | 5bb973fe2e7696bc01470462ac85f135770c8896 (patch) | |
tree | 220d33dd7b8f796885cbf6e169fed8345c103560 /activerecord | |
parent | 2fd540a266ad92230b4e565474b627f825993732 (diff) | |
download | rails-5bb973fe2e7696bc01470462ac85f135770c8896.tar.gz rails-5bb973fe2e7696bc01470462ac85f135770c8896.tar.bz2 rails-5bb973fe2e7696bc01470462ac85f135770c8896.zip |
Improve documentation for ActiveRecord transactions.
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 |