aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-01-19 15:21:53 +0530
committerVipul A M <vipulnsward@gmail.com>2016-01-19 15:21:53 +0530
commit8b0b0b0675d269e8c8b4a8a1d9ab7209661fdba2 (patch)
tree165796d9c3e67635f67073a40be4f7a655fd4663
parentbb4c63c70368c6f0189bf1f380ef66c07d7de40d (diff)
downloadrails-8b0b0b0675d269e8c8b4a8a1d9ab7209661fdba2.tar.gz
rails-8b0b0b0675d269e8c8b4a8a1d9ab7209661fdba2.tar.bz2
rails-8b0b0b0675d269e8c8b4a8a1d9ab7209661fdba2.zip
Mention that halting chain does not re-raise `ActiveRecord::RecordInvalid` exception as well, similar to `ActiveRecord::Rollback`
Fixes #22297 [ci skip]
-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
--------------------