]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/map_bugs/_bug.xml.builder
Use the right author name for bugs in RSS format
[rails.git] / app / views / map_bugs / _bug.xml.builder
index 69683b7ddad92cb92b7020f89c0c6c6d4370851b..1219f3d74ad38e70c33af3abe867491a50f2ee09 100644 (file)
@@ -1,26 +1,20 @@
 xml.bug("lon" => bug.lon, "lat" => bug.lat) do
   xml.id bug.id
-  xml.date_created bug.date_created
+  xml.date_created bug.created_at
   xml.nearby bug.nearby_place
   xml.status bug.status
 
   if bug.status == "closed"
-    xml.date_closed bug.date_closed
+    xml.date_closed bug.closed_at
   end
 
   xml.comments do
-    bug.map_bug_comment.each do |comment|
+    bug.comments.each do |comment|
       xml.comment do
-        xml.date comment.date_created
-
-        unless comment.commenter_id.nil?
-          xml.uid comment.commenter_id
-          xml.user comment.user.display_name   
-        else
-          xml.user comment.commenter_name
-        end
-
-        xml.text comment.comment
+        xml.date comment.created_at
+        xml.uid comment.author_id unless comment.author_id.nil?
+        xml.user comment.author_name
+        xml.text comment.body
       end      
     end
   end