Forum: Ruby on Rails to_xml eager loading?

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.
Ba4b0b302231bffb0f685bbef25db0d6?d=identicon&s=25 Bryan Liles (Guest)
on 2007-01-02 03:42
(Received via mailing list)
Activerecord supports eager loading with the following syntax:
Author.find(:all, :include=>[{:posts=>:comments}, :categorizations].

to_xml has an :include option that supports a shallow form of eager
loading to create the xml:  author.to_xml(:include[:posts]).

Is there a way to generate the xml from all associated objects for a
particular model instance?
This topic is locked and can not be replied to.