diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-09 14:55:15 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-10 10:13:22 -0700 |
commit | 9b5202692065ea3ed116a0098a0312a9236e9983 (patch) | |
tree | 34cbe41d8c3369862da3f719543541819b91161b /activesupport | |
parent | 2b1d7ea335afa46fa167a680492cdf5461c46064 (diff) | |
download | rails-9b5202692065ea3ed116a0098a0312a9236e9983.tar.gz rails-9b5202692065ea3ed116a0098a0312a9236e9983.tar.bz2 rails-9b5202692065ea3ed116a0098a0312a9236e9983.zip |
fixing more variable names
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 328db8c890..850e307857 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -170,15 +170,15 @@ module ActiveSupport # Wraps code with filter def apply(next_callback) - conditions = conditions_lambdas - source = make_lambda @raw_filter + user_conditions = conditions_lambdas + user_callback = make_lambda @raw_filter case @kind when :before halted_lambda = eval "lambda { |result| #{chain.config[:terminator]} }" lambda { |target, halted, value, &block| - if !halted && conditions.all? { |c| c.call(target, value) } - result = source.call target, value + if !halted && user_conditions.all? { |c| c.call(target, value) } + result = user_callback.call target, value halted = halted_lambda.call result if halted target.send :halted_callback_hook, @raw_filter.inspect @@ -190,25 +190,25 @@ module ActiveSupport if chain.config[:skip_after_callbacks_if_terminated] lambda { |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 + if !halted && user_conditions.all? { |c| c.call(target, value) } + user_callback.call target, value end [target, halted, value] } else lambda { |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 + if user_conditions.all? { |c| c.call(target, value) } + user_callback.call target, value end [target, halted, value] } end when :around lambda { |target, halted, value, &block| - if !halted && conditions.all? { |c| c.call(target, value) } + if !halted && user_conditions.all? { |c| c.call(target, value) } retval = nil - source.call(target, value) { + user_callback.call(target, value) { retval = next_callback.call(target, halted, value, &block) retval.last } |