I have an issue in my phoenix templates: whenever I try to use the confirm
option for links in my app, such as:
<%= link to: admin_post_comment_path(@conn, :delete, @post, comment), method: :delete, data: [confirm: "Are you sure?"] do %>
<%= gettext "Delete" %>
<% end %>
I see the confirm window flashing but the request goes through, skipping the confirmation. Also, in this case, it does not do a DELETE
but a simple GET
on the path. If I remove the confirm
, the deletion goes through without any issue.
Anybody has an idea of how to fix this? Thanks!