aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-05-14 14:08:39 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-05-14 14:08:39 -0700
commitdef815a4615817acf49fed289a87aa0debb6a4ea (patch)
tree6d84514422c478cece937d59b4924fc9518a370b
parentdbee8c32588083f54857e01b20479229b2f49498 (diff)
downloadrails-def815a4615817acf49fed289a87aa0debb6a4ea.tar.gz
rails-def815a4615817acf49fed289a87aa0debb6a4ea.tar.bz2
rails-def815a4615817acf49fed289a87aa0debb6a4ea.zip
halting lambda must be instance execed
-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