Skip to content

Commit

Permalink
fix variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed May 10, 2013
1 parent d5fdc0d commit 2b1d7ea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions activesupport/lib/active_support/callbacks.rb
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2b1d7ea

Please sign in to comment.