Use dc:creator instead of author for the author's name
authorTom Hughes <tom@compton.nu>
Fri, 24 May 2013 08:12:25 +0000 (09:12 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 24 May 2013 08:16:28 +0000 (09:16 +0100)
Unfortunately the braindead RSS speciifcation requires author to
be an email address, so we have to use Dublin Core metadata to
report the author name instead.

app/views/notes/feed.rss.builder

index 26378a5..06c5b98 100644 (file)
@@ -1,6 +1,7 @@
 xml.instruct!
 
 xml.rss("version" => "2.0", 
+        "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
@@ -30,7 +31,7 @@ xml.rss("version" => "2.0",
         end
 
         if comment.author
-          xml.author comment.author.display_name
+          xml.dc :creator, comment.author.display_name
         end
 
         xml.pubDate comment.created_at.to_s(:rfc822)