I have a bit of a problem and don’t know how to proceed:
I have the following RXML Template that:
for article in @articles
xml.id(article.id, :type => ‘integer’)
xml.created_at(article.created_at.xmlschema, :type =>
xml.id(author.id, :type => ‘integer’)
Some articles have an author and some do not. In this case I get an
error complaining about author being null when accessing author.id.
I can’t figure out how to conditionally include the author tag in the
XML only if article.author is not nil.