rails- devise - can't log out
devise, routes, ruby-on-rails
Solution
No route matches [GET] "/account/sign_out"
You tried to access that link via a GET method, but your route is DELETE, as you've posted.
destroy_standard_user_session DELETE /account/sign_out(.:format)
So, to make that work, use the `method` parameter from `link_to` (I'm supposing you're creating your link with `link_to`)
Something like this
link_to "Sign Out", destroy_standard_user_session_path, :method => :delete
Best regards
Problem
I can't test my login... 'cos I can't logout (haven't put the logout button there yet). I was able to test it once but now I am 'stuck' logged in! How come I can't use `http://localhost:3000/account/sign_out` and I get an error `No route matches [GET] "/account/sign_out"` but `rake routes` gives me: ``` ... new_standard_user_session GET /account/sign_in(.:format) devise/sessions#new standard_user_session POST /account/sign_in(.:format) devise/sessions#create destroy_standard_user_session DELETE /account/sign_out(.:format) devise/sessions#destroy new_standard_user_registration GET /account/sign_up(.:format) devise/registrations#new ... ``` and my `/account/sign_in` and `/account_sign_up` url's are ok