Forum: Ruby on Rails ActiveResource and Links

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
on 2007-04-20 01:06
(Received via mailing list)
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'/>

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.


This topic is locked and can not be replied to.