Permalink
Browse files

fix variable name

  • Loading branch information...
1 parent d5fdc0d commit 2b1d7ea335afa46fa167a680492cdf5461c46064 @tenderlove tenderlove committed May 9, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 activesupport/lib/active_support/callbacks.rb
@@ -169,7 +169,7 @@ def recompile!(_options)
end
# Wraps code with filter
- def apply(code)
+ def apply(next_callback)
conditions = conditions_lambdas
source = make_lambda @raw_filter
@@ -184,20 +184,20 @@ def apply(code)
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
[target, halted, value]
}
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 @@ def apply(code)
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

0 comments on commit 2b1d7ea

Please sign in to comment.