aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-10-16 07:55:47 -0700
committerYves Senn <yves.senn@gmail.com>2013-10-16 07:55:47 -0700
commitf2ca5aa5c2e9fed43ab11937906d98bd436ab820 (patch)
tree145731fd47cd0cd9b9878c149b558d4bbf2ae578 /guides/source
parent49bc23f6786261427a8b7856a776afa03e3a5742 (diff)
parentcb609b3975e43430d193822d13d7ce4bfbabd20f (diff)
downloadrails-f2ca5aa5c2e9fed43ab11937906d98bd436ab820.tar.gz
rails-f2ca5aa5c2e9fed43ab11937906d98bd436ab820.tar.bz2
rails-f2ca5aa5c2e9fed43ab11937906d98bd436ab820.zip
Merge pull request #12545 from nateberkopec/rephrase_callback_warning
Rephrase ActiveRecord transaction rollback warning [ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_record_callbacks.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_record_callbacks.md b/guides/source/active_record_callbacks.md
index aa2ce99f6d..5cc6ca5798 100644
--- a/guides/source/active_record_callbacks.md
+++ b/guides/source/active_record_callbacks.md
@@ -204,7 +204,7 @@ As you start registering new callbacks for your models, they will be queued for
The whole callback chain is wrapped in a transaction. If any _before_ callback method returns exactly `false` or raises an exception, the execution chain gets halted and a ROLLBACK is issued; _after_ callbacks can only accomplish that by raising an exception.
-WARNING. Raising an arbitrary exception may break code that expects `save` and its friends not to fail like that. The `ActiveRecord::Rollback` exception is thought precisely to tell Active Record a rollback is going on. That one is internally captured but not reraised.
+WARNING. Any exception that is not `ActiveRecord::Rollback` will be re-raised by Rails after the callback chain is halted. Raising an exception other than `ActiveRecord::Rollback` may break code that does not expect methods like `save` and `update_attributes` (which normally try to return `true` or `false`) to raise an exception.
Relational Callbacks
--------------------