I am using the following code for my routes:
devise_for :user,
:as => '',
:path_names => {
:sign_in => "",
:sign_out => "logout",
:sign_up => "register"
}
But when I'm logged out and I goto /logout
I get the following error:
No route matches {:action=>"new",
:controller=>"devise/sessions"}
How do I setup the root path to be to :sign_in
action?
Best Answer
To follow on from the people who are asking about the error
Could not find devise mapping for path "/"
there is a workaround.You'll find that there is a clue in your logs which will probably say:
So I retried the approach but instead wrapping it (as @miccet suggets) inside a scope block:
This worked fine for me