Here is my rails link_to
<%= link_to 'Delete',url_for(action: :delete,id: @user.id),data: {confirm: "Are you sure?"} %>
I tried the above method but it is directly deleting without any alert message. What wrong I made. Can any one correct it.
question from:https://stackoverflow.com/questions/19588058/rails-confirm-before-delete