Hi
Has anyone an explanation why the following routing is not working?
ActionController::Routing::Routes.draw do |map| map.namespace :admin do |admin| admin.connect ':controller/:action/:id' admin.connect ':controller/:action/:id.:format' end map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end
The following error message ist caused only by “admin.connect ':controller/:action/:id.:format'”. Route segment ":controller" cannot be optional because it precedes a required segment. This segment will be required.
Replacing it with the following rule works fine:
map.connect 'admin/users/:action.:format', { :controller => 'admin/ users' }
Interestingly, the variant without explicit format works fine under the namespace…
Any idea?
$am