开发者

Rails 3 Devise, Everything routes to localhost index

开发者 https://www.devze.com 2023-03-21 03:53 出处:网络
So I followed the Railscasts tutorials, and everything works up until I click submit on my sign up form. It gave me a root error which I then researched and found that the answer is there is no route.

So I followed the Railscasts tutorials, and everything works up until I click submit on my sign up form. It gave me a root error which I then researched and found that the answer is there is no route. So I used 开发者_如何学Goroot :to => 'home#index' in my routes file, which then allowed me to sign up and then get relocated to the index, but now when I try to access the sign up or login, I get the index page.

Here is my routes.rb file

Travel::Application.routes.draw do
 devise_for :users
root :to => 'home#index'
end


It's because you can't access the sign up or login pages while already logged in. Try accessing /users/sign_out first.

0

精彩评论

暂无评论...
验证码 换一张
取 消