[Rails] Re: Link_to delete action

2010-05-03 Thread Punit Rathore
The reason it is failing is because it is performing a GET request. Wrap the "delete relationship" in a form( with :method => :delete) and it should work -- Punit Greg Ma wrote: > Hi, > I am trying to generate a link to delete a relationship, so I've done > the code bellow. THis is the full cod

[Rails] Re: Link_to delete action

2010-04-25 Thread Greg Ma
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 -- Posted via http://www.ruby-forum.com

[Rails] Re: Link_to delete action

2010-04-25 Thread Greg Ma
Thanks guys -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk