Alex Rivera | Logout

link_to delete url is not working

Asked 2010-12-12T18:45:43.693
23

I have the following link_to delete url in my app

<%=link_to "Delete",blog_path(@blog.id), :method => :delete, :class => "delete", :confirm => "Are you sure ?"%>  

It does not seem to be working.When I click this url, it just takes me to the show path.Can someone please tell me how to fix this. Thanks.

Edit
Report

2 Answers

18

Make sure these lines appear in application.js :

 //= require jquery
 //= require jquery_ujs
answered 2012-08-03T10:12:59.463
5

Ensure that you have java script turned on. Otherwise :method => :delete acts just as show in Rails.

answered 2010-12-12T18:48:43.650

Your Answer