mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
halting lambda must be instance execed
This commit is contained in:
parent
dbee8c3258
commit
def815a461
1 changed files with 2 additions and 2 deletions
|
@ -131,7 +131,7 @@ module ActiveSupport
|
||||||
|
|
||||||
if !halted && user_conditions.all? { |c| c.call(target, value) }
|
if !halted && user_conditions.all? { |c| c.call(target, value) }
|
||||||
result = user_callback.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
|
if env.halted
|
||||||
target.send :halted_callback_hook, filter
|
target.send :halted_callback_hook, filter
|
||||||
end
|
end
|
||||||
|
@ -148,7 +148,7 @@ module ActiveSupport
|
||||||
|
|
||||||
if !halted
|
if !halted
|
||||||
result = user_callback.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
|
if env.halted
|
||||||
target.send :halted_callback_hook, filter
|
target.send :halted_callback_hook, filter
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue