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

<p dir="auto">I was wondering how on earth cgimap wound up with an API extension relative to rails and it it turns out the history is far older and more baroque than I was expecting.</p>
<p dir="auto">The cgimap version came in with <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="208492716" data-permission-text="Title is private" data-url="https://github.com/zerebubuth/openstreetmap-cgimap/issues/129" data-hovercard-type="pull_request" data-hovercard-url="/zerebubuth/openstreetmap-cgimap/pull/129/hovercard" href="https://github.com/zerebubuth/openstreetmap-cgimap/pull/129">zerebubuth/openstreetmap-cgimap#129</a> which also added the single object versions calls which rails does have - that claims to be implementing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="141964207" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/1189" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/1189/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/1189">#1189</a> for cgimap but actually is using a subtly different syntax.</p>
<p dir="auto">That is probably a rather unfortunate syntax in fact because unlike <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="141964207" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/1189" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/1189/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/1189">#1189</a> it doesn't maintain the separation between main controller methods and history controller methods which then leads to the code here having to a complicated dance with the main controller accessing history objects and also to the non-deterministic uniqification where if you ask for the current version of an object in both versioned and unversioned form you don't know which one will be returned.</p>
<p dir="auto">Now of course they should always be the same but it's an interesting wart.</p>
<p dir="auto">I don't see any obvious problem with the code other than the rather complex nature of the abstract parent as <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mmd-osm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mmd-osm">@mmd-osm</a>  noted which is not ideal but then equally neither is duplicating everything.</p>
<p dir="auto">Possibly it would better to add new tests rather than add lots of cases to the existing ones. I suspect <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gravitystorm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gravitystorm">@gravitystorm</a> will think so though he'd probably also say we should split the existing one.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3715#pullrequestreview-1477767622">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJYPR74OSZ3EGE72ELXLCSXZANCNFSM6AAAAAAQUBL4IE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKCXH3I4YFRZUWH7P3XLCSXZA5CNFSM6AAAAAAQUBL4IGWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTSYCTY4M.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/3715/review/1477767622</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3715#pullrequestreview-1477767622",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3715#pullrequestreview-1477767622",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>