I know this questions could be stupid but I didnt found a way to solve
this issue. Can somebody give me a hint?
Two things:
You don’t have to stick with the defaults, if you want action/
controller, action/id/controller, randomword/action etc… then just go
ahead.
You can also have wildcards in the paths you match, which sounds like
what you want
The docs for ActionController::Routing (or ActionDispatch::Routing)
have plenty of examples. There’s also a guide on routing (http:// Rails Routing from the Outside In — Ruby on Rails Guides)
Hi Ivan, I inserted now the above mentioned line but I am getting now
the following error:
/config/routes.rb:8:in block in <top (required)>': undefined local variable or methodmap’ for #<ActionDispatch::Routing::Mapper:
0x3eba8b0> (NameError)
There is a very good recipe for this kind of things: Please check
Rails Recipes book [Make Your URLS Meaningful (and Pretty)]
Most likely you will need something like this:
map.connect ‘:user’, :controller => ‘users’, :action =>
‘show’, :filter => ‘user’