aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorclaudiob <claudiob@gmail.com>2014-12-14 22:10:15 -0800
committerclaudiob <claudiob@gmail.com>2015-01-02 15:31:56 -0800
commitbb78af73ab7e86fd9662e8810e346b082a1ae193 (patch)
treeeef33ea8ee271af92d621fe68155f169d51b5a65 /activerecord/CHANGELOG.md
parent91b8129320522f664801f122daea4a7628db90a7 (diff)
downloadrails-bb78af73ab7e86fd9662e8810e346b082a1ae193.tar.gz
rails-bb78af73ab7e86fd9662e8810e346b082a1ae193.tar.bz2
rails-bb78af73ab7e86fd9662e8810e346b082a1ae193.zip
Deprecate `false` as the way to halt AR callbacks
Before this commit, returning `false` in an ActiveRecord `before_` callback such as `before_create` would halt the callback chain. After this commit, the behavior is deprecated: will still work until the next release of Rails but will also display a deprecation warning. The preferred way to halt a callback chain is to explicitly `throw(:abort)`.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 8980a1d874..60313a0a02 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,11 @@
+* Deprecate returning `false` as a way to halt callback chains.
+
+ Returning `false` in a `before_` callback will display a
+ deprecation warning explaining that the preferred method to halt a callback
+ chain is to explicitly `throw(:abort)`.
+
+ *claudiob*
+
* Clear query cache on rollback.
*Florian Weingarten*