diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-15 09:18:08 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-15 09:18:16 -0700 |
commit | d433436271c5270021648a44fcf7467843d9a25f (patch) | |
tree | dbb66393d3e5bf48374e03eb9491a44ac43ebbeb /activesupport/lib | |
parent | e84207b3373bfb0ab7fbce1fd807e26451442cff (diff) | |
download | rails-d433436271c5270021648a44fcf7467843d9a25f.tar.gz rails-d433436271c5270021648a44fcf7467843d9a25f.tar.bz2 rails-d433436271c5270021648a44fcf7467843d9a25f.zip |
use unless instead of if!
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index c4cfc11372..1ba6d85b95 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -146,7 +146,7 @@ module ActiveSupport value = env.value halted = env.halted - if !halted + unless halted result = user_callback.call target, value env.halted = halted_lambda.call(target, result) if env.halted @@ -217,7 +217,7 @@ module ActiveSupport def self.halting(next_callback, user_callback) lambda { |env| env = next_callback.call env - if !env.halted + unless env.halted user_callback.call env.target, env.value end env @@ -284,7 +284,7 @@ module ActiveSupport target = env.target value = env.value - if !env.halted + unless env.halted user_callback.call(target, value) { env = next_callback.call env env.value |