]> git.openstreetmap.org Git - rails.git/blob - app/views/api/notes/_note.rss.builder
Add frozen_string_literal comments to ruby files
[rails.git] / app / views / api / notes / _note.rss.builder
1 # frozen_string_literal: true
2
3 xml.item do
4   location = describe_location(note.lat, note.lon, 14, locale)
5
6   if note.closed?
7     xml.title t("api.notes.rss.closed", :place => location)
8   elsif note.comments.length > 1
9     xml.title t("api.notes.rss.commented", :place => location)
10   else
11     xml.title t("api.notes.rss.opened", :place => location)
12   end
13
14   xml.link note_url(note)
15   xml.guid api_note_url(note)
16   xml.description render(:partial => "description", :object => note, :formats => [:html])
17
18   xml.dc :creator, note.author.display_name unless note.author.nil? || note.author.status == "deleted"
19
20   xml.pubDate note.created_at.to_fs(:rfc822)
21   xml.geo :lat, note.lat
22   xml.geo :long, note.lon
23   xml.georss :point, "#{note.lat} #{note.lon}"
24 end