After returning to an old Rails project I found none of the destroy/delete links worked and clicking cancel on the confirmation popup would still submit the link.
Example of my code is:
<%= link_to 'Delete', admin_user_path(@user), :confirm => 'Are you sure?', :method => :delete %>
This problem occurs if you are using jQuery, and if not, then look for something like that:
In my case, I was using:
javascript_include_tag :all %>
And it was not working, but when I put it like:
javascript_include_tag :defaults %>
It worked!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With