Devon Quick
Devon Quick

Reputation: 348

Rails 4 data: {confirm:} not working

<%=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

Answers (1)

Boltz0r
Boltz0r

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

Related Questions