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 t(".title")
 
  12     xml.link url_for(:controller => "/traces", :action => :index, :only_path => false)
 
  15       xml.url image_url("mag_map-rss2.0.png")
 
  19       xml.link url_for(:controller => "/traces", :action => :index, :only_path => false)
 
  22     @traces.each do |trace|
 
  26         xml.link show_trace_url(trace.user, trace)
 
  27         xml.guid show_trace_url(trace.user, trace)
 
  30           xml.cdata! render(:partial => "description", :object => trace, :as => "trace", :formats => [:html])
 
  33         xml.dc :creator, trace.user.display_name
 
  35         xml.pubDate trace.timestamp.to_fs(:rfc822)
 
  37         if trace.latitude && trace.longitude
 
  38           xml.geo :lat, trace.latitude
 
  39           xml.geo :long, trace.longitude
 
  40           xml.georss :point, "#{trace.latitude} #{trace.longitude}"