I am getting, the following routing error, i am not sure why it is not routing to DELETE and goes to GET
No route matches [GET] "/signout"
html.erb:
<%= link_to "Sign out", signout_path, method: "delete" %>
routes.rb:
match '/signout', to: 'sessions#destroy', via: :delete
What command am i missing?
You want to ensure you have the jquery_ujs
file loaded as part of your application.js
manifest. I believe in older versions of Rails it is known as rails_ujs
.
// ...
//= require jquery_ujs
// ...