From 91b8129320522f664801f122daea4a7628db90a7 Mon Sep 17 00:00:00 2001 From: claudiob Date: Mon, 8 Dec 2014 06:53:24 -0800 Subject: Deprecate `false` as the way to halt AM callbacks Before this commit, returning `false` in an ActiveModel `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)`. --- activemodel/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel/CHANGELOG.md') diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index 562d49d069..b52ec8a67f 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,6 +1,6 @@ * Deprecate returning `false` as a way to halt callback chains. - Returning `false` in a `before_` validation callback will display a + 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)`. -- cgit v1.2.3