Eric Anderson
Eric Anderson

Reputation: 366

Rails Devise Signout not working

I am having issues logging out of my Rails app via Devise. I have looked at several different posts about this and have been struggling for a couple days now.

couldnt-find-user-with-id-sign-out

couldnt-find-user-with-id-sign-out

are some examples that have not worked so far. I have a feeling it is javascript related but I am not sure.

routes.rb:

Rails.application.routes.draw do
resources :events
devise_for :users
resources :users
resources :articles
resources :athletes

get 'welcome/index'
get 'athletes/index'
get 'users/login'
root 'welcome#index'
end

application.html.rb

<% if user_signed_in? %>
    <%= link_to 'Logout', destroy_user_session_path, :method => :delete %>

application.js

//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_bootstrap
//= require_tree .

Any advise or direction would be appreciated I am not sure where to go from here.

thanks,

Upvotes: 1

Views: 1220

Answers (1)

Eric Anderson
Eric Anderson

Reputation: 366

I resolved this be modifying ./config/initializers/devise.rb and changing

config.sign_out_via = :get

Upvotes: 4

Related Questions