xml.instruct! :xml, version: "1.0", encoding: "UTF-8" xml.rss(version: "2.0", "xmlns:atom" => "http://www.w3.org/2005/Atom") do xml.channel do xml.title "Agnes the Alien's blog" xml.link articles_url xml.description "Agnes the Alien's blog at galaxy" xml.language "en-us" @articles.each do |article| xml.item do xml.title article.title xml.link article_url(article) xml.guid article_url(article) xml.tag!('description', article.text.to_s) xml.tag!('pubDate', article.created_at.rfc2822) end end end end