<blockquote>
<p>Check out <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="460937103" data-permission-text="Issue title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2278" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2278/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2278">#2278</a> since it applies to many of the partial renderings that you have in this PR.</p>
</blockquote>
<p>Not 100% sure, if my understanding is right, so let's try <code>/map/index.xml.builder</code>:</p>
<pre><code>xml.instruct!

xml.osm(OSM::API.new.xml_root_attributes) do |osm|
  osm << (render(:partial => "bounds", :object => @bounds) || "")
  osm << (render(@nodes) || "")
  osm << (render(@ways) || "")
  osm << (render(@relations) || "")
end
</code></pre>
<p>Triggers:</p>
<p><code>API threw unexpected ActionView::Template::Error exception: Missing partial api/nodes/_node with {:locale=>[:en], :formats=>[:xml], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jsonify, :coffee]}. </code></p>
<p>I believe this kind of optimization doesn't work due to the way I'm keeping all node, way and relation partials under the umbrella of the /map call.</p>
<p><a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="460937103" data-permission-text="Issue title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2278" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2278/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2278">#2278</a> works in that other pull request, as all partials are located in the directory named after the model, so the direct lookup is possible. Somehow I'm working against that convention in my coding...</p>
<p>I think he only way to make this work would be to move /api/map/_{node,way,relation}.xml.builder to /api/{nodes,ways,relations} respectively.</p>

<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/2223?email_source=notifications&email_token=AAK2OLKQ4MFZ6H5V3YWHLBTP4PFA5A5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYUWCBY#issuecomment-506028295">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLZUW4EDUN7EHVEXULP4PFA5ANCNFSM4HLMFYOQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLJ5F2RMRAVJBB6KLGTP4PFA5A5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYUWCBY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2223?email_source=notifications\u0026email_token=AAK2OLKQ4MFZ6H5V3YWHLBTP4PFA5A5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYUWCBY#issuecomment-506028295",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2223?email_source=notifications\u0026email_token=AAK2OLKQ4MFZ6H5V3YWHLBTP4PFA5A5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYUWCBY#issuecomment-506028295",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>