Hi,
I’m having problem with a link_to delete action. I don’t understant what
i’m doing is wrong.
Here is my code:
<% participant = item.participants(:user_id => current_user.id).first
%>
<%= link_to “Ne plus participer”, participant , :method => :delete,
:confirm => “Etes vous sur de ne plus vouloir participer?” %>
Actually I was wrong, I am thinking the thing the wrong way.
I have a model Defi which as many Participant.
I would like to create a link_to to add a Participant to a Defi.
How do I do this? Is it in the Defi controller or the Participant
controller?
Greg
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.