diff options
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/callbacks.rb | 2 | ||||
-rw-r--r-- | activemodel/lib/active_model/validations/callbacks.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/callbacks.rb b/activemodel/lib/active_model/callbacks.rb index b3d70dc515..061d96a80b 100644 --- a/activemodel/lib/active_model/callbacks.rb +++ b/activemodel/lib/active_model/callbacks.rb @@ -103,7 +103,7 @@ module ActiveModel def define_model_callbacks(*callbacks) options = callbacks.extract_options! options = { - terminator: ->(_,result) { result == false }, + terminator: ->(_,result_lambda) { result_lambda.call == false }, 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 25ccabd66b..449f1a0299 100644 --- a/activemodel/lib/active_model/validations/callbacks.rb +++ b/activemodel/lib/active_model/validations/callbacks.rb @@ -23,7 +23,7 @@ module ActiveModel included do include ActiveSupport::Callbacks define_callbacks :validation, - terminator: ->(_,result) { result == false }, + terminator: ->(_,result_lambda) { result_lambda.call == false }, skip_after_callbacks_if_terminated: true, scope: [:kind, :name] end |