Topic: default no-name controller?

Can I set up a default no-name controller so that my URL will look like:[action]/[id]

instead of:[controller]/[action]/[id]

I'd like to get rid of the redirect form to[controller]/index

Thanks in advance for any help


Re: default no-name controller?

In routes.rb, in the block:

map.connect ':action/:id', :controller => 'default'

Change 'default' to the name of the controller you want running that URL.

Make sure this route is higher priority than the ones set by default (higher up in the source code).

vinnie - rails forum admin

Re: default no-name controller?

I should have known it would be easy! wink