Mason
Mason

Reputation: 37

What's wrong with my delete link?

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

Upvotes: 0

Views: 143

Answers (2)

Pravin
Pravin

Reputation: 6662

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.

Upvotes: 0

Spyros
Spyros

Reputation: 48706

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

Upvotes: 1

Related Questions