xml.instruct! :xml, version: "1.0" xml.rss :version => "2.0" do xml.channel do xml.title "AgnestheAlien" xml.description "Agnes the Alien's blog" xml.link root_url Article.order('created_at DESC').each do |article| xml.item do xml.title article.title xml.description article.text.to_plain_text[0,150] xml.pubDate article.created_at.rfc2822 xml.link article_url(article) xml.guid article_url(article) end end end end