Skip to content

Commit 6e469c1

Browse files
committed
Update documentation for destroy callbacks
1 parent 3531ca6 commit 6e469c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

guides/source/active_record_callbacks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@ throw :abort
343343

344344
WARNING. Any exception that is not `ActiveRecord::Rollback` or `ActiveRecord::RecordInvalid` will be re-raised by Rails after the callback chain is halted. Additionally, may break code that does not expect methods like `save` and `update` (which normally try to return `true` or `false`) to raise an exception.
345345

346+
NOTE: If an `ActiveRecord::RecordNotDestroyed` is raised within `after_destroy`, `before_destroy` or `around_destroy` callback, it will not be re-raised and the `destroy` method will return `false`.
347+
346348
Relational Callbacks
347349
--------------------
348350

0 commit comments

Comments
 (0)