mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
0cdeee428e
- ### Problem In some cirumstances, the deprecation message to warn that AJ won't run `after_(enqueue/perform)` callbacks when the chain is halted by a `throw(:abort)` will be thrown even though no `throw(:abort)` was thrown. ```ruby run_callback(:foo) do ... end ``` There is two possible way for the callback body to not be executed: 1) `before` callback throw a `abort` 2) `before` callback raises an error which is rescued by an around callback (See associated test in this commit for an example) When 2) happen we don't want to output a deprecation message, because what the message says isn't true and doesn't apply. ### Solution In order to differentiate between 1) and 2), I have added a `halted_callback_hook` which is called by ActiveSupport callback whenever the callback chain is halted. |
||
---|---|---|
.. | ||
adapters | ||
cases | ||
integration | ||
jobs | ||
models | ||
support | ||
helper.rb |