<p><b>@gravitystorm</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2223#discussion_r298332486">app/controllers/api/map_controller.rb</a>:</p>
<pre style='color:#555'>> @@ -92,13 +91,16 @@ def index
 
       # this "uniq" may be slightly inefficient; it may be better to first collect and output
       # all node-related relations, then find the *not yet covered* way-related ones etc.
+      @relations = []
</pre>
<p><code>@relations = relations.uniq</code></p>
<p>Or perhaps rename the <code>relations</code> variable right from the start to <code>@relations</code>, and then <code>@relations.uniq!</code> at this point</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2223#discussion_r298332891">app/controllers/api/nodes_controller.rb</a>:</p>
<pre style='color:#555'>> @@ -31,7 +31,12 @@ def show
       response.last_modified = node.timestamp
 
       if node.visible
-        render :xml => node.to_xml.to_s
+        @node = node
</pre>
<p>Perhaps <code>@node</code> throughout</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2223#discussion_r298333658">app/controllers/api/nodes_controller.rb</a>:</p>
<pre style='color:#555'>> @@ -31,7 +31,12 @@ def show
       response.last_modified = node.timestamp
 
       if node.visible
-        render :xml => node.to_xml.to_s
+        @node = node
</pre>
<p>There's a bunch of other places like this too - generally if you find yourself needing to rename <code>variable</code> to <code>@variable</code> it probably should have been <code>@variable</code> from the start. But it's not critical, we can always refactor this later.</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=AAK2OLJYM4IQLVBTA46NAJDP4UIMXA5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB44ZGXA#pullrequestreview-255431516">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIMN4AJKVQWX23VDBDP4UIMXANCNFSM4HLMFYOQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLLLJ752ZXUPL66JHX3P4UIMXA5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB44ZGXA.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=AAK2OLJYM4IQLVBTA46NAJDP4UIMXA5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB44ZGXA#pullrequestreview-255431516",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2223?email_source=notifications\u0026email_token=AAK2OLJYM4IQLVBTA46NAJDP4UIMXA5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB44ZGXA#pullrequestreview-255431516",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>