diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-14 14:08:39 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-14 14:08:39 -0700 |
commit | def815a4615817acf49fed289a87aa0debb6a4ea (patch) | |
tree | 6d84514422c478cece937d59b4924fc9518a370b | |
parent | dbee8c32588083f54857e01b20479229b2f49498 (diff) | |
download | rails-def815a4615817acf49fed289a87aa0debb6a4ea.tar.gz rails-def815a4615817acf49fed289a87aa0debb6a4ea.tar.bz2 rails-def815a4615817acf49fed289a87aa0debb6a4ea.zip |
halting lambda must be instance execed
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 4 |
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 |