From 6e41f3d6ae2cda88e5316cec747b6ec79e4c0cd0 Mon Sep 17 00:00:00 2001 From: hukl Date: Thu, 10 Sep 2009 16:20:41 +0200 Subject: modifications for a valid atom feed --- app/views/rss/updates.xml.builder | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/rss/updates.xml.builder b/app/views/rss/updates.xml.builder index 541ad4e..8d873c0 100644 --- a/app/views/rss/updates.xml.builder +++ b/app/views/rss/updates.xml.builder @@ -2,17 +2,24 @@ xml.instruct! xml.feed(:xmlns => "http://www.w3.org/2005/Atom") do xml.title("Chaos Computer Club Updates") xml.link(:href => "http://www.ccc.de/") - xml.updated(@items.first.published_at) - xml.author("Chaos Computer Club e.V.") + xml.link(:rel => "self", :href => "/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) port = (request.port != 80) ? port = ":#{request.port}" : "" - xml.link(request.protocol + request.host + port + item.public_link) + xml.link( + :href => "#{request.protocol}#{request.host}#{port}/#{I18n.locale.to_s}" \ + "#{item.public_link}", + :rel => "alternate" + ) xml.id(request.protocol + request.host + port + item.public_link) - xml.updated(item.updated_at) + xml.updated(item.updated_at.xmlschema) xml.content(:type => "xhtml") do xml.div(item.body, :xmlns => "http://www.w3.org/1999/xhtml") end -- cgit v1.3