Hi Greg, You might want to put your variable assignment (participant) in your controller instead of your view.
In your link_to, 'participant' has no meaning. Do you have RESTful routing setup? Perhaps you meant to write: <%= link_to "Ne pluys participer", participant_path(@participant), :method => :delete ...... On Mon, Apr 26, 2010 at 12:10 AM, Greg Ma <[email protected]> wrote: > 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?" %> > > > Greg > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

