No route matches [GET] "/users/sign_out"
I had a similar problem, but addition of the :method=> :delete didn't work. I was able to add a new route for a the get request by commenting out the devise_for :users and adding
devise_for :users do
get '/users/sign_out' => 'devise/sessions#destroy'
end
I had a similar problem. My view code was like this:
<%= link_to " exit", destroy_user_session_path, method: :delete %>
After adding the following change to routes.rb it worked,
devise_for :users
devise_scope :user do
get '/users/sign_out' => 'devise/sessions#destroy'
end
You can end a session via get by changing the devise configuration in initializers.
# The default HTTP method used to sign out a resource. Default is :delete.
config.sign_out_via = :get
Just open the link and your session is removed.