Skip to content
Browse files

golf down a bit

  • Loading branch information...
1 parent 3d0dc81 commit 75bfe647834bc9e46d6400c21cd8ffeb80cffd89 @tenderlove tenderlove committed May 28, 2014
Showing with 4 additions and 8 deletions.
  1. +4 −8 actionpack/lib/action_dispatch/routing/mapper.rb
View
12 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -239,8 +239,7 @@ def app
def default_controller_and_action
return {} if to.respond_to? :call
- controller, action = get_controller_and_action(
- default_controller,
+ controller, action = get_controller_and_action(default_controller,
default_action,
to,
@scope[:module]
@@ -278,12 +277,9 @@ def check_part(name, part, hash)
def get_controller_and_action(controller, action, to, modyoule)
case to
- when Symbol
- action = to.to_s
- when /#/
- controller, action = to.split('#')
- when String
- controller = to
+ when Symbol then action = to.to_s
+ when /#/ then controller, action = to.split('#')
+ when String then controller = to
end
if modyoule && !controller.is_a?(Regexp)

0 comments on commit 75bfe64

Please sign in to comment.
Something went wrong with that request. Please try again.