From bc2908b802f911b44884f3de01369d298554cbb7 Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 8 Nov 2009 18:58:56 +0100 Subject: changes for atom feed - hope that helps --- app/views/layouts/application.html.erb | 2 +- app/views/rss/updates.xml.builder | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'app') diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index c7704ac..cc4c01b 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -12,7 +12,7 @@ <%= stylesheet_link_tag "shadowbox" %> <%= javascript_include_tag 'public' %> - <%= auto_discovery_link_tag(:rss, {:controller => "rss", :action => "updates"}) %> + <%= auto_discovery_link_tag(:atom, {:controller => "rss", :action => "updates"}) %> diff --git a/app/views/rss/updates.xml.builder b/app/views/rss/updates.xml.builder index 6be49e9..2461099 100644 --- a/app/views/rss/updates.xml.builder +++ b/app/views/rss/updates.xml.builder @@ -3,21 +3,22 @@ xml.instruct! xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do xml.title("Chaos Computer Club Updates") xml.link(:href => "http://www.ccc.de/") - xml.link(:rel => "self", :href => "/rss/updates.xml") + xml.link(:rel => "self", :href => "#{@host}/rss/updates") xml.updated(@items.first.published_at.xmlschema) xml.author do xml.name("Chaos Computer Club e.V.") end - xml.id("http://www.ccc.de/") + xml.id("#{@host}/rss/updates") @items.each do |item| xml.entry do xml.title(item.title) xml.link( - :href => content_path_helper(item.node.unique_path), - :rel => "alternate" + :href => "#{@host}/de/#{item.node.unique_name}", + :rel => "alternate", + :type => "text/html" ) - xml.id(content_url_helper(item.node.unique_path)) + xml.id(item.node.id) xml.updated(item.published_at.xmlschema) xml.content(:type => "xhtml") do xml.div(item.body, :xmlns => "http://www.w3.org/1999/xhtml") -- cgit v1.3