Skip to content
Browse files

controllers with slash names are also not supported, so we can reuse …

…the message
  • Loading branch information...
1 parent d311922 commit 7e61a327ce0fdb4b98a76d318ca0b5ffee0be7de @tenderlove tenderlove committed
Showing with 2 additions and 6 deletions.
  1. +2 −6 actionpack/lib/action_dispatch/routing/mapper.rb
View
8 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -249,12 +249,8 @@ def default_controller_and_action
hash = check_part(:controller, controller, {}) do |part|
translate_controller(part) {
- if part =~ %r{\A/}
- message = "controller name should not start with a slash"
- else
- message = "'#{part}' is not a supported controller name. This can lead to potential routing problems."
- message << " See http://guides.rubyonrails.org/routing.html#specifying-a-controller-to-use"
- end
+ message = "'#{part}' is not a supported controller name. This can lead to potential routing problems."
+ message << " See http://guides.rubyonrails.org/routing.html#specifying-a-controller-to-use"
raise ArgumentError, message
}

0 comments on commit 7e61a32

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