开发者

What's wrong with my delete link?

开发者 https://www.devze.com 2023-02-24 03:06 出处:网络
<%= link_to \"Delete Party\", party_path(@party.id), :method => :delete %> a GET is always called according to the logs. I just get redirected to the same show page when I click开发者_开发知
<%= link_to "Delete Party", party_path(@party.id), :method => :delete %>

a GET is always called according to the logs. I just get redirected to the same show page when I click开发者_开发知识库 the delete link.


Instead of @party.id, use @party in party_path().


The solution worked for me.. I was using jQuery 1.4.4 and facing issues with the delete link, I read somewhere about the jQuery version issue and switched to jQuery 1.4.2 and delete link worked fine for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消