Skip to content

Instantly share code, notes, and snippets.

@jbrechtel
Created July 27, 2009 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbrechtel/156695 to your computer and use it in GitHub Desktop.
Save jbrechtel/156695 to your computer and use it in GitHub Desktop.
xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
xml.title "light code"
xml.description "light code posts"
xml.link formatted_post_url(:rss)
for post in @posts
xml.item do
xml.title post.title
xml.description post.body
xml.pubDate post.created_at.to_s(:rfc822)
xml.link formatted_post_url(post)
xml.guid formatted_post_url(post, :rss)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment