diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-12 20:34:10 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-12 20:34:10 -0300 |
commit | c24c9def366371a3cafcbd831c3fccab14f36c2d (patch) | |
tree | c36e39e227c005fdc1270ebc300f43ad8189d4ed | |
parent | 3ccd24a33f3f9d6cad83181708e5aa11588b88b0 (diff) | |
parent | dce2385095615274a6971a773ba1957aa8202e10 (diff) | |
download | rails-c24c9def366371a3cafcbd831c3fccab14f36c2d.tar.gz rails-c24c9def366371a3cafcbd831c3fccab14f36c2d.tar.bz2 rails-c24c9def366371a3cafcbd831c3fccab14f36c2d.zip |
Merge pull request #15080 from eileencodes/flip-unless-else-conditional-in-halting-method
flip conditional to use if/else instead of unless/else
-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 05ca943776..0a99cbd004 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -297,14 +297,14 @@ module ActiveSupport target = env.target value = env.value - unless env.halted + if env.halted + next_callback.call env + else user_callback.call(target, value) { env = next_callback.call env env.value } env - else - next_callback.call env end } end |