aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_callbacks.md
diff options
context:
space:
mode:
authorAbdelkader Boudih <terminale@gmail.com>2016-01-19 11:19:17 +0000
committerAbdelkader Boudih <terminale@gmail.com>2016-01-19 11:19:17 +0000
commitf8234313feab83c65912b2d96a6dd8e0149b8642 (patch)
tree3f18c471de7396502da7d6684619a1eddd15f024 /guides/source/active_record_callbacks.md
parent1599868610c43afc2836dc1b2c8dd3a8e45eddcf (diff)
parent8b0b0b0675d269e8c8b4a8a1d9ab7209661fdba2 (diff)
downloadrails-f8234313feab83c65912b2d96a6dd8e0149b8642.tar.gz
rails-f8234313feab83c65912b2d96a6dd8e0149b8642.tar.bz2
rails-f8234313feab83c65912b2d96a6dd8e0149b8642.zip
Merge pull request #23117 from vipulnsward/22297-ar-exception-raise
Mention that halting chain does not re-raise `ActiveRecord::RecordIn…
Diffstat (limited to 'guides/source/active_record_callbacks.md')
-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 d95c6c0e78..fb5d2065d3 100644
--- a/guides/source/active_record_callbacks.md
+++ b/guides/source/active_record_callbacks.md
@@ -258,7 +258,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. 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.
+WARNING. Any exception that is not `ActiveRecord::Rollback` or `ActiveRecord::RecordInvalid` will be re-raised by Rails after the callback chain is halted. Raising an exception other than `ActiveRecord::Rollback` or `ActiveRecord::RecordInvalid` 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
--------------------