Reputation: 348
<%=link_to "Delete", :action => 'destroy_password', :id => p.id, :job => @job, data: {confirm:'Are you sure you want to delete this password?'} %>
This link deletes the data but doesn't prompt to confirm. Any ideas why the confirm is not working? This is Rails 4
It is passing the data through as a parameter in the URL.
Upvotes: 1
Views: 1758
Reputation: 980
<%=link_to "Delete", {:action => 'destroy_password', :id => p.id, :job => @job},:method => :delete ,data: {confirm:'Are you sure you want to delete this password?'} %>
Upvotes: 5