Sorry!  I found the right syntax:

Client.first.to_xml(:include => {:projects => {:include => :tasks}})

On Oct 12, 8:59 pm, TomRossi7 <[email protected]> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to