Routes in Rails 3
I'm new to Rails 3 and I need some help regarding the routes.
This is my old route
map.connect '/admin/login/:language/:brand',
:controller => 'adm/auth', :action => 'login',
:defaults => {:brand => 'brand', :language => 'en'}
as I change it to
match '/admin/login/:language/:brand', :to => 'adm/auth#login' ,
:defaults => {:brand => 'brand', :language => 'en'}
and also
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
to
match "/:controller(/:action(/:id))"
match "/:controller(/:action(/:id))(.:format)"
but still I'm getting No route matches [GET] "/cmm" ,error.
I'm using Jruby 1.6.4 and rails 3.开发者_如何学C1.1
Somebody please help me!
Could you post the complete url you are trying to access (maybe redact the domain, if that's a secret).
Basically I'm interested in if /cmm
is in the start of the url, therein lies your problem. As I read you routes, you have nothing matching example.com/cmm/...
精彩评论