aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/abstract_unit.rb
diff options
context:
space:
mode:
authorclaudiob <claudiob@gmail.com>2014-12-14 22:46:23 -0800
committerclaudiob <claudiob@gmail.com>2015-01-02 15:31:55 -0800
commitd217daf6a740de7e4925872abe632982cfaab89b (patch)
treeab0fe69ba6f3bc4d07aaaa3530633ebd8ca14d63 /activesupport/test/abstract_unit.rb
parent2386daabe7f8c979b453010dc0de3e1f6bbf859d (diff)
downloadrails-d217daf6a740de7e4925872abe632982cfaab89b.tar.gz
rails-d217daf6a740de7e4925872abe632982cfaab89b.tar.bz2
rails-d217daf6a740de7e4925872abe632982cfaab89b.zip
Deprecate `false` as the way to halt AS callbacks
After this commit, returning `false` in a callback will display a deprecation warning to make developers aware of the fact that they need to explicitly `throw(:abort)` if their intention is to halt a callback chain. This commit also patches two internal uses of AS::Callbacks (inside ActiveRecord and ActionDispatch) which sometimes return `false` but whose returned value is not meaningful for the purpose of execution. In both cases, the returned value is set to `true`, which does not affect the execution of the callbacks but prevents unrequested deprecation warnings from showing up.
Diffstat (limited to 'activesupport/test/abstract_unit.rb')
0 files changed, 0 insertions, 0 deletions