I have a link to delete the session for the current user
<%= link "Logout", to: session_path(@conn, :delete, current_user.id), method: :delete, class: "button alert" %>
For some reason it doesn't work although when I changed the link to a button everything seems to be working fine.
<%= button "Logout", to: session_path(@conn, :delete, current_user.id), method: :delete, class: "button alert" %>
I am confused for might be the reason causing this error.
Anyone who faced the same issue?