Folks Does anyone know how i could call destroy on a controller using rails 3.1 from a jquery function. Im just trying to find some examples online and cant seem to find anything that shows this. Thanks -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Feb 15, 3:51 pm, brent brent <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Folks > Does anyone know how i could call destroy on a controller using rails > 3.1 from a jquery function. Im just trying to find some examples online > and cant seem to find anything that shows this. Thanks > > -- > Posted viahttp://www.ruby-forum.com/.I think this will work: $.ajax({ type: ''delete'' [...other stuff...] }); Regards. -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
you might want to check out Railscasts.com episodes 196 and 197. He uses a link to do that -- not sure if that is what you want, but it is good starting point. On Feb 15, 9:51 am, brent brent <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Folks > Does anyone know how i could call destroy on a controller using rails > 3.1 from a jquery function. Im just trying to find some examples online > and cant seem to find anything that shows this. Thanks > > -- > Posted viahttp://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.