My routes.rb look like this:
#...
map.resources :users
map.root :controller => "main"开发者_开发知识库
#...
My app user's profiles are something like:
http://www.railsapp.com/users/3
I would like to change it to:
http://www.railsapp.com/3
Or even:
http://www.railsapp.com/username
How Rails 2.x router handles this situation?
Checkout some previous answers for 'vanity' urls:
How can I implement vanity URL's in a Rails application?
How to implement "short" nested vanity urls in rails?
精彩评论