<p>This pull request gets rid of the to_xml method in the changeset model, and replaces it with XML builder code in the view which is the canonical way of generating output. This paves the way to parametrising XML output later. Some changes to the tests were necessary to make up for the lost to_xml functionality in the model. The plan is to get rid of other, similar to_xml methods one by one.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/2164'>https://github.com/openstreetmap/openstreetmap-website/pull/2164</a></p>
<h4>Commit Summary</h4>
<ul>
<li>move changeset xml generation to view</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2164/files#diff-0">app/controllers/api/changeset_comments_controller.rb</a>
(9)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2164/files#diff-1">app/controllers/api/changesets_controller.rb</a>
(38)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2164/files#diff-2">app/models/changeset.rb</a>
(61)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2164/files#diff-3">app/views/changesets/_changeset.builder</a>
(43)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2164/files#diff-4">app/views/changesets/changeset.builder</a>
(7)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2164/files#diff-5">app/views/changesets/changesets.builder</a>
(9)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2164/files#diff-6">test/controllers/api/changesets_controller_test.rb</a>
(26)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2164.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/2164.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2164.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/2164.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2164">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLV320wao6bB1HhBmd8FUYdvwDTdUks5vSHU8gaJpZM4bYBli">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLYjPAhoUD9rhZhcz2EGWllDlMtSVks5vSHU8gaJpZM4bYBli.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"move changeset xml generation to view (#2164)"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/2164"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2164",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2164",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>