aboutsummaryrefslogtreecommitdiffstats
path: root/railties/CHANGELOG.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-03 17:22:20 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-03 17:22:20 -0300
commit4591b0fc041454f4ba4a83629b9bbca2a851969c (patch)
tree21b9019ee5d471205ccde051977d3c92b0a4f800 /railties/CHANGELOG.md
parent900758145d65438190a69f0fd227f62e01fa7bd2 (diff)
parent9c65c539e2caa4590aded1975aead008f8135da4 (diff)
downloadrails-4591b0fc041454f4ba4a83629b9bbca2a851969c.tar.gz
rails-4591b0fc041454f4ba4a83629b9bbca2a851969c.tar.bz2
rails-4591b0fc041454f4ba4a83629b9bbca2a851969c.zip
Merge pull request #17227 from claudiob/explicitly-abort-callbacks
Introduce explicit way of halting callback chains by throwing :abort. Deprecate current implicit behavior of halting callback chains by returning `false` in apps ported to Rails 5.0. Completely remove that behavior in brand new Rails 5.0 apps. Conflicts: railties/CHANGELOG.md
Diffstat (limited to 'railties/CHANGELOG.md')
-rw-r--r--railties/CHANGELOG.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index 588cea8886..5367a4dd0e 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,3 +1,18 @@
+* Add `config/initializers/callback_terminator.rb`
+
+ Newly generated Rails apps have a new initializer called
+ `callback_terminator.rb` which sets the value of the configuration option
+ `config.active_support.halt_callback_chains_on_return_false` to `false`.
+
+ As a result, new Rails apps do not halt callback chains when a callback
+ returns `false`; only when they are explicitly halted with `throw(:abort)`.
+
+ The terminator is *not* added when running `rake rails:update`, so returning
+ `false` will still work on old apps ported to Rails 5, displaying a
+ deprecation warning to prompt users to update their code to the new syntax.
+
+ *claudiob*
+
* Generated fixtures won't use the id when generated with references attributes.
*Pablo Olmos de Aguilera Corradini*