]> git.openstreetmap.org Git - rails.git/blob - app/views/api/changeset_comments/_changeset_comment.xml.builder
Add frozen_string_literal comments to ruby files
[rails.git] / app / views / api / changeset_comments / _changeset_comment.xml.builder
1 # frozen_string_literal: true
2
3 cattrs = {
4   "id" => changeset_comment.id,
5   "date" => changeset_comment.created_at.xmlschema,
6   "visible" => changeset_comment.visible
7 }
8 if changeset_comment.author.data_public?
9   cattrs["uid"] = changeset_comment.author.id
10   cattrs["user"] = changeset_comment.author.display_name
11 end
12 xml.comment(cattrs) do |comment_xml_node|
13   comment_xml_node.text(changeset_comment.body)
14 end