I am trying to get this link to work, performing a DELETE request:
<%= link_to "Sign Out", destroy_user_session_path, method: :delete %>
However when I click on it, my browser still performs a GET request (which fails for obvious reasons):
I have read on multiple other forum posts, that this might have something to do with jquery not being included. They mentioned you would need to un-comment a line in app/javascript/application.js, however mine is pretty empty:
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
import "@hotwired/turbo-rails"
import "controllers"
These forum posts were also quite old, so I suspect something has changed in the meantime.

method: :deletetodata: { turbo_method: :delete }work?statusin your redirect:redirect_to action: 'some_action', status: 303. Because: If you are using XHR requests other thanGETorPOSTand redirecting after the request then some browsers will follow the redirect using the original request method. This may lead to undesirable behavior such as a doubleDELETE. To work around this you can return a303 See Otherstatus code which will be followed using aGETrequest. Also see: api.rubyonrails.org/classes/ActionController/…