Use a full url for the image in the diary rss feed.
[rails.git] / app / views / diary_entry / rss.rss.builder
1 xml.instruct!
2
3 xml.rss("version" => "2.0",
4         "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
5         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
6         "xmlns:georss" => "http://www.georss.org/georss") do
7   xml.channel do
8     xml.title @title
9     xml.description @description
10     xml.link url_for(:action => "list", :host => SERVER_URL)
11     xml.image do
12       xml.url image_path("mag_map-rss2.0.png", :host => SERVER_URL)
13       xml.title @title
14       xml.width "100"
15       xml.height "100"
16       xml.link url_for(:action => "list", :host => SERVER_URL)
17     end
18
19     @entries.each do |entry|
20       xml.item do
21         xml.title entry.title
22         xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
23         xml.guid url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
24         xml.description entry.body.to_html
25         xml.dc :creator, entry.user.display_name
26         xml.pubDate entry.created_at.to_s(:rfc822)
27         xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :host => SERVER_URL)
28
29         if entry.latitude && entry.longitude
30           xml.geo :lat, entry.latitude.to_s
31           xml.geo :long, entry.longitude.to_s
32           xml.georss :point, "#{entry.latitude} #{entry.longitude}"
33         end
34       end
35     end
36   end
37 end