From ba221a5c15e6b2d818df6cf0a8d9c5c62906d213 Mon Sep 17 00:00:00 2001 From: hukl Date: Fri, 11 Sep 2009 22:32:25 +0200 Subject: first steps for recent changes rss feed --- app/views/rss/recent_changes.xml.builder | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 app/views/rss/recent_changes.xml.builder (limited to 'app/views/rss/recent_changes.xml.builder') diff --git a/app/views/rss/recent_changes.xml.builder b/app/views/rss/recent_changes.xml.builder new file mode 100644 index 0000000..390fbdf --- /dev/null +++ b/app/views/rss/recent_changes.xml.builder @@ -0,0 +1,29 @@ +xml.instruct! + +xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do + xml.title("CCC.de Recent Change") + xml.link(:href => "http://www.ccc.de/") + xml.link(:rel => "self", :href => "/rss/updates.xml") + xml.updated(@items.first.published_at.xmlschema) + xml.author do + xml.name("Chaos Computer Club e.V.") + end + xml.id("http://www.ccc.de/") + + @items.each do |item| + xml.entry do + xml.title(item.title) + xml.link( + :href => content_path_helper(item.node.unique_path), + :rel => "alternate" + ) + xml.id(content_url_helper(item.node.unique_path)) + xml.updated(item.updated_at.xmlschema) + xml.content(:type => "text") do + xml.div("changed by #{item.user.login}") + end + end + + end + +end \ No newline at end of file -- cgit v1.3