I am having some strange errors since I implemented bootstrap into my project. Currently I can not log out because a DESTROY request is being replaced by a GET request. This exact same link worked fine until I made my menu bootstrap. Here is the link:
<li><a href="<%= session_path(current_user.id)%>">Logout</a></li>
here is what is in the session controller:
def destroy
log_out
redirect_to root_path
end
here is what my routes look like:
What is the best way to fix this? Adding method: :delete
to the link did not work. Thanks!
UPDATE:
here is my bundle exec rake routes | grep session:
and here is my routes.rb:
Rails.application.routes.draw do
root to: 'application#home'
resources :users
resources :sessions, only: [:new, :create, :destroy]
end