RubyAMF POST

2 views
Skip to first unread message

creid

unread,
Apr 9, 2008, 9:35:40 PM4/9/08
to rubyamf
Why is it that looking at my Mongrel Logs, all my RESTful calls with
RubyAMF register a POST request(operation)?

Thanks!

Luke Pillow

unread,
Apr 9, 2008, 11:53:43 PM4/9/08
to rub...@googlegroups.com
Could you explain what you mean by "RESTful calls with RubyAMF?"  Are you calling #index, #show, #create, & #update methods on a controller you have routed as a resource? 

creid

unread,
Apr 10, 2008, 12:31:54 PM4/10/08
to rubyamf
Yeah exactly that..[smiles].

Luke Pillow

unread,
Apr 10, 2008, 3:33:34 PM4/10/08
to rub...@googlegroups.com
OK... when you use RubyAMF you're using Flex RemoteObjects (unless you're not using Flex) to make calls to Rails controllers.  When you setup your Flex project you had to create and configure a services-config.xml that contained a service destination you probably named (id) "rubyamf."  It's configured to use an AMFChannel with an endpoint uri that directs all rubyamf RemoteObject calls to the RubyamfController's #gateway action that does its magic and invokes the controller and method you specified in you request.

So in short... RemoteObject makes POSTs to /rubyamf/gateway

Unless you're sharing your controllers with other clients/presentations, you don't even need to map/route any resources besides the rubyamf/gateway that works with the default route.

I hope that helps.

creid

unread,
Apr 10, 2008, 10:46:31 PM4/10/08
to rubyamf
Thanks a lot!
Reply all
Reply to author
Forward
0 new messages