X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7e5cbe87ed37f9cba8224fa4049047d7f981f66a..1f59507e78e16a281407f16b804e2111323bc767:/app/views/api/changesets/_changeset.xml.builder diff --git a/app/views/api/changesets/_changeset.xml.builder b/app/views/api/changesets/_changeset.xml.builder index e0188a10e..072f8fc5d 100644 --- a/app/views/api/changesets/_changeset.xml.builder +++ b/app/views/api/changesets/_changeset.xml.builder @@ -24,19 +24,10 @@ xml.changeset(attrs) do |changeset_xml_node| # include discussion if requested - if @include_discussion + if @comments changeset_xml_node.discussion do |discussion_xml_node| - changeset.comments.includes(:author).each do |comment| - cattrs = { - "date" => comment.created_at.xmlschema - } - if comment.author.data_public? - cattrs["uid"] = comment.author.id - cattrs["user"] = comment.author.display_name - end - discussion_xml_node.comment(cattrs) do |comment_xml_node| - comment_xml_node.text(comment.body) - end + @comments.each do |comment| + discussion_xml_node << render(comment) end end end