destroy_user_session doesn't work in Devise
-
12-11-2019 - |
Question
I'm using rails 3.1.3 and devise 1.5.3 and when I add destroy_user_session_path
to my layout file, the link doesn't work. I can login just fine, but when I click this path I get this error:
No route matches [GET] "/users/sign_out"
BUT, if I run rake routes, I see this route listed:
destroy_user_session DELETE /users/sign_out(.:format)
{:action=>"destroy", :controller=>"devise/sessions"}
So the route clearly uses the DELETE verb. I can get the path to work by adding :method => :delete
, but why do I have to do that? The route is there and configured to be a delete already, so what's up?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow