jeudi 12 mai 2016

the link_to with confirm works only after reloading the page

 **<%= link_to "Delete",(@article) ,method:"delete",data: { confirm: 'Are you sure you want to delete ?' } %>**

I have a rails app which lets the user create an account and posts delete and update add comments and get notifications using rails and Jquery

when I click the buttons which include confirm messages do not work until I refresh the page !!!why ?? what i should do ??

<%= link_to "Delete",(@article) ,method:"delete",data: { confirm: 'Are you sure you want to delete ?' } %>

Aucun commentaire:

Enregistrer un commentaire