aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-09-23 22:18:33 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2015-09-23 22:18:33 +0200
commit9c55ff564d21c178979cab126258123fa4b8b52a (patch)
treec9230df89d2bc89a85e27faecec32ff3971c3398 /activemodel
parent262f92364b8d3e4eddb490bcb8b31c0ca9b934f9 (diff)
parent35cd3656218f800aaf2500c23945cf7fe084d1a7 (diff)
downloadrails-9c55ff564d21c178979cab126258123fa4b8b52a.tar.gz
rails-9c55ff564d21c178979cab126258123fa4b8b52a.tar.bz2
rails-9c55ff564d21c178979cab126258123fa4b8b52a.zip
Merge pull request #21218 from repinel/fix-as-callback-terminator
WIP: Fix the AS::Callbacks terminator regression from 4.2.3
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/callbacks.rb1
-rw-r--r--activemodel/lib/active_model/validations/callbacks.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/callbacks.rb b/activemodel/lib/active_model/callbacks.rb
index 2cf39b68fb..0d6a3dc52d 100644
--- a/activemodel/lib/active_model/callbacks.rb
+++ b/activemodel/lib/active_model/callbacks.rb
@@ -103,6 +103,7 @@ module ActiveModel
def define_model_callbacks(*callbacks)
options = callbacks.extract_options!
options = {
+ terminator: deprecated_false_terminator,
skip_after_callbacks_if_terminated: true,
scope: [:kind, :name],
only: [:before, :around, :after]
diff --git a/activemodel/lib/active_model/validations/callbacks.rb b/activemodel/lib/active_model/validations/callbacks.rb
index 4b58ef66e3..52111e5442 100644
--- a/activemodel/lib/active_model/validations/callbacks.rb
+++ b/activemodel/lib/active_model/validations/callbacks.rb
@@ -23,6 +23,7 @@ module ActiveModel
included do
include ActiveSupport::Callbacks
define_callbacks :validation,
+ terminator: deprecated_false_terminator,
skip_after_callbacks_if_terminated: true,
scope: [:kind, :name]
end