我目前正在使用Rails 3.2.5和最新的设计宝石。
目前,用户可以访问他们的个人资料页面... example.com/users/john-doe
我想删除网址的用户部分,因此网址为 example.com/john-doe 。这有可能用设计吗?
现在我的路线文件中有以下内容......
devise_for :users, :controllers => {:omniauth_callbacks => 'omniauth_callbacks'}
答案 0 :(得分:1)
只需为其添加路线即可。您可能希望它是路径文件中的最后一个。
类似的东西:
match '/:user' => "users#show", :as => :user_profile