Including associations in to_xml

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?


Sorry! I found the right syntax:

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