diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-09 14:47:17 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-10 10:13:22 -0700 |
commit | 2b1d7ea335afa46fa167a680492cdf5461c46064 (patch) | |
tree | 3f39718b457381e9ac259ade33d648ebd272f78d | |
parent | d5fdc0d4480f3558de9d260be26d4c7782ebc781 (diff) | |
download | rails-2b1d7ea335afa46fa167a680492cdf5461c46064.tar.gz rails-2b1d7ea335afa46fa167a680492cdf5461c46064.tar.bz2 rails-2b1d7ea335afa46fa167a680492cdf5461c46064.zip |
fix variable name
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 027b5becf1..328db8c890 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -169,7 +169,7 @@ module ActiveSupport end # Wraps code with filter - def apply(code) + def apply(next_callback) conditions = conditions_lambdas source = make_lambda @raw_filter @@ -184,12 +184,12 @@ module ActiveSupport target.send :halted_callback_hook, @raw_filter.inspect end end - code.call target, halted, value, &block + next_callback.call target, halted, value, &block } when :after if chain.config[:skip_after_callbacks_if_terminated] lambda { |target, halted, value, &block| - target, halted, value = code.call target, halted, value, &block + target, halted, value = next_callback.call target, halted, value, &block if !halted && conditions.all? { |c| c.call(target, value) } source.call target, value end @@ -197,7 +197,7 @@ module ActiveSupport } else lambda { |target, halted, value, &block| - target, halted, value = code.call target, halted, value, &block + target, halted, value = next_callback.call target, halted, value, &block if conditions.all? { |c| c.call(target, value) } source.call target, value end @@ -209,12 +209,12 @@ module ActiveSupport if !halted && conditions.all? { |c| c.call(target, value) } retval = nil source.call(target, value) { - retval = code.call(target, halted, value, &block) + retval = next_callback.call(target, halted, value, &block) retval.last } retval else - code.call target, halted, value, &block + next_callback.call target, halted, value, &block end } end |