Evan
2008-Nov-03 04:16 UTC
Changing drop_receiving_element behavior to make a GET request instead of POST
Is it possible to specify which HTTP method to use in the drop_receiving_element helper? I''m trying to follow REST best practices in my app. On one page I have the user drop an icon into an area which calls the "new" representation of a particular resource. However, drop_receiving_element sends the request as POST which is not allowed. How can I change the method so it makes a GET request? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Evan
2008-Nov-06 16:21 UTC
Re: Changing drop_receiving_element behavior to make a GET request instead of POST
For those curious, I solved this problem by abandoning the drop_receiving_element helper and writing my own Ajax.Updater (see Prototype documentation) code on the page. Ajax.Updater takes a "method" option which allows you to specify get, post, put, delete, etc. On Nov 2, 8:16 pm, Evan <evancha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is it possible to specify which HTTP method to use in the > drop_receiving_element helper? I''m trying to follow REST best > practices in my app. On one page I have the user drop an icon into an > area which calls the "new" representation of a particular resource. > However, drop_receiving_element sends the request as POST which is not > allowed. How can I change the method so it makes a GET request?--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---