How to ask for confirmation when submitting a delete request in Rails with submit_tag?
After some minor research, I found that this works for me! I tried ":confirm" attribute in the tag, but it didn't work
<%= submit_tag( "Destroy",:onclick => "return confirm('Are you sure?')" ) %>
After some minor research, I found that this works for me! I tried ":confirm" attribute in the tag, but it didn't work
<%= submit_tag( "Destroy",:onclick => "return confirm('Are you sure?')" ) %>
Comments