1 # frozen_string_literal: true
 
   5 xml.rss("version" => "2.0",
 
   6         "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
 
   7         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
 
   8         "xmlns:georss" => "http://www.georss.org/georss") do
 
  11     xml.description @description
 
  12     xml.link url_for(:action => "index", :only_path => false)
 
  14       xml.url image_url("mag_map-rss2.0.png")
 
  18       xml.link url_for(:action => "index", :only_path => false)
 
  21     @entries.each do |entry|
 
  24         xml.link diary_entry_url(entry.user, entry, :only_path => false)
 
  25         xml.guid diary_entry_url(entry.user, entry, :only_path => false)
 
  26         xml.description entry.body.to_html
 
  27         xml.dc :creator, entry.user.display_name
 
  28         xml.pubDate entry.created_at.to_fs(:rfc822)
 
  29         xml.comments diary_entry_url(entry.user, entry, :anchor => "comments", :only_path => false)
 
  31         if entry.latitude && entry.longitude
 
  32           xml.geo :lat, entry.latitude.to_s
 
  33           xml.geo :long, entry.longitude.to_s
 
  34           xml.georss :point, "#{entry.latitude} #{entry.longitude}"