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
I think this will work:
$.ajax({ type: 'delete' [...other stuff...] });
Regards.
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.