aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/callbacks.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index d2a545b6d4..5b8a300528 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -131,7 +131,7 @@ module ActiveSupport
if !halted && user_conditions.all? { |c| c.call(target, value) }
result = user_callback.call target, value
- env.halted = halted_lambda.call result
+ env.halted = target.instance_exec result, &halted_lambda
if env.halted
target.send :halted_callback_hook, filter
end
@@ -148,7 +148,7 @@ module ActiveSupport
if !halted
result = user_callback.call target, value
- env.halted = halted_lambda.call result
+ env.halted = target.instance_exec result, &halted_lambda
if env.halted
target.send :halted_callback_hook, filter
end