Rails 7 – link_to with method :delete still performs GET request

As suggested here, the following will suffice:

<%= link_to "Sign Out", destroy_user_session_path, data: { "turbo-method": :delete } %>

I have tested this in my project and it seems to work fine. Thanks also to @alexts, you basically figured this out too, however the comment on GitHub even eliminated the double-request.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)