I'm trying to do this latest project using Restful techniques, but how do you deal with Ajax and http POSTs? I have a helper function that generates a paginated, searchable custom ajax grid (developed pre-rest). The form_remote_tag really, really wants to use post. The observe_field wants to post. I had eventually wanted to use an autocomplete, but that uses post as well. A post to the "list" url attempts to create a new resource. How do you all deal with this? - Create a ;search/filter type action for the postbacks? - Somehow get all these events to use GET? - Inspect the post and determine best course of action (feels like a total hack) I've been muckin' around with this but the answer has not jumped out at me yet. Thanks in advance....
on 2007-02-15 17:51
on 2007-02-15 17:57
On Feb 15, 8:50 am, "Meech" <Meech...@gmail.com> wrote: > I'm trying to do this latest project using Restful techniques, but how > do you deal with Ajax and http POSTs? > - Somehow get all these events to use GET? yes, add a :method => :get in the link_to_remote
on 2007-02-15 18:01
but... <%= form_remote_tag :method=>:get %> still renders as: <form method="post" If the user clicks on the submit buttin -- it's indeed posted.