diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-02-09 21:10:53 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-02-09 22:30:43 +0100 |
commit | 9e10d591991e8e52488880f5c0d518590716d225 (patch) | |
tree | ddac9a14cbdd6ed244b11d94f7636ffa864767c0 /actionpack/lib/action_dispatch/routing | |
parent | 9c5cc89ede353c1b756d294ee28e4d011655b164 (diff) | |
download | rails-9e10d591991e8e52488880f5c0d518590716d225.tar.gz rails-9e10d591991e8e52488880f5c0d518590716d225.tar.bz2 rails-9e10d591991e8e52488880f5c0d518590716d225.zip |
the `:controller` option for routes can contain numbers. closes #9231.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 34f5f80d4d..0a41ed0fcf 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -246,7 +246,7 @@ module ActionDispatch raise ArgumentError, "missing :action" end - if controller.is_a?(String) && controller !~ /\A[a-z_\/]+\z/ + if controller.is_a?(String) && controller !~ /\A[a-z_0-9\/]*\z/ message = "'#{controller}' 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 |