Created
July 27, 2009 19:48
-
-
Save jbrechtel/156695 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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