stevemolitor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Apr-19 21:04 UTC
ActiveResource and Links
Is there a way to get ActiveResource to intelligently handle resource documents that contain links to other resources? For example lets say we have a tree hierarchy, where a child resource belongs to a parent resource, and parents have children. The service returns a document describing one resources, with a link to a parent. For example: GET http://my-host/my-resources/456'' # => <my-resource id=''456''> <name>a name</name> <parent id=''123'' xlink:href=''http://my-host/my-resources/123''/> </my-resource> What''s the best way to walk that tree with ActiveResource? Ideally I''d like to avoid using the parent id and use the parent href instead, as it seems more RESTful. But whatever works. Thanks. Steve --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---