aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-12 20:34:10 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-12 20:34:10 -0300
commitc24c9def366371a3cafcbd831c3fccab14f36c2d (patch)
treec36e39e227c005fdc1270ebc300f43ad8189d4ed
parent3ccd24a33f3f9d6cad83181708e5aa11588b88b0 (diff)
parentdce2385095615274a6971a773ba1957aa8202e10 (diff)
downloadrails-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.rb6
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