I am trying to create a restful XML output for a model but also want to include the data from a related table. For example, I have a model called person and the person has multiple photos. I want to include the url of each photo so that the restful user can then retrieve the photos if needed. I know I could create a separate url like person/ 123/photos and that would work, but is an additional query. Either would include a url of the actual photo photo/987. Again I could also do person/123/photo/987 Would I be better off to have the one url of person/123 return the person info along with the photos or separate urls as mentioned above? Also the pros and cons of the extended photo url Thanks Don F.
on 2009-04-05 13:29