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.
精彩评论