标签: ruby-on-rails routing routes accessibility url-routing
我的routes.rb看起来像这样:
#... map.resources :users map.root :controller => "main" #...
我的应用用户的个人资料类似于:
http://www.railsapp.com/ 用户/ 3
我想将其更改为:
http://www.railsapp.com/ 3
甚至:
http://www.railsapp.com/的用户名
Rails 2.x路由器如何处理这种情况?
答案 0 :(得分:1)
查看“虚荣”网址以前的一些答案:
How can I implement vanity URL's in a Rails application?
How to implement "short" nested vanity urls in rails?