I got this error after adding the Sign Out link in Chp 2:
no route matches [get] “/users/sign_out”
after adding the follow code:
<%= link_to "Log Out", destroy_user_session_path, method: :delete %>
My initial fix was to add the get method to the sign out route through the devise config file located at config/initializers/devise.rb:
config.sign_out_via = [:delete, :get]
//= require jquery //= require jquery_ujs
I then included this in the application template view with:
I went back and removed the :get method that I added in the devise.rb file and now everything acts normally.
My question is if I should have done this through webpack instead of the assets pipeline, and if so how would I accomplish this? Is there something else that I missed? Thanks!