标签: ruby-on-rails-3 devise routes
在带有设计的rails 3项目中,如何将登录页面/ users / sign_in放在根路径中。
我尝试routes.rb置root :to => "users#sign_in"或root :to => "sessions#sign_in",但不行或其他方式?
routes.rb
root :to => "users#sign_in"
root :to => "sessions#sign_in"
答案 0 :(得分:0)
使用以下内容配置routes.rb
devise_scope :user do get "/", :to => "devise/sessions#new" end