]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/api/changesets/_changeset.xml.builder
Merge pull request #4592 from AntonKhorev/simplify-link_to-on-block-pages
[rails.git] / app / views / api / changesets / _changeset.xml.builder
index bc4365eb6c7f049f2060d737995d2bf782ecb94a..08cfbbc79bc9d66065ef6b6ca3362502fe32ecae 100644 (file)
@@ -24,12 +24,13 @@ xml.changeset(attrs) do |changeset_xml_node|
 
   # include discussion if requested
 
 
   # include discussion if requested
 
-  if @include_discussion
+  if @comments
     changeset_xml_node.discussion do |discussion_xml_node|
     changeset_xml_node.discussion do |discussion_xml_node|
-      changeset.comments.includes(:author).each do |comment|
+      @comments.each do |comment|
         cattrs = {
           "id" => comment.id,
         cattrs = {
           "id" => comment.id,
-          "date" => comment.created_at.xmlschema
+          "date" => comment.created_at.xmlschema,
+          "visible" => comment.visible
         }
         if comment.author.data_public?
           cattrs["uid"] = comment.author.id
         }
         if comment.author.data_public?
           cattrs["uid"] = comment.author.id