Sorry! I found the right syntax:
Client.first.to_xml(:include => {:projects => {:include => :tasks}})
On Oct 12, 8:59 pm, TomRossi7
<t...-5bxIUPmzHicFraO2wh7vUA@public.gmane.org>
wrote:> I''m not sure if this is a Rails bug or if it is something else,
but I
> can''t get two levels deep in the to_xml method. For example:
>
> Client.first.to_xml(:include => [:projects => :tasks])
>
> will throw the exception:
>
> NoMethodError: undefined method `macro'' for nil:NilClass
>
> Does anyone know if this is possible?
>
> Thanks!
> Tom
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.