Permalink
Browse files

Increase readability of ternary statement in build method

  • Loading branch information...
1 parent 0400a7f commit 2948668bf1509941d7862362ed9c67b95f6cb155 @buddhamagnet buddhamagnet committed Apr 20, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 actionpack/lib/action_controller/metal.rb
@@ -36,8 +36,7 @@ def build(action, app=nil, &block)
raise "MiddlewareStack#build requires an app" unless app
middlewares.reverse.inject(app) do |a, middleware|
- middleware.valid?(action) ?
- middleware.build(a) : a
+ middleware.valid?(action) ? middleware.build(a) : a
end
end
end

0 comments on commit 2948668

Please sign in to comment.