<p></p>
<p><b>@gravitystorm</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4789#discussion_r1599960939">app/views/changesets/show.html.erb</a>:</p>
<pre style='color:#555'>> @@ -33,7 +33,7 @@
<li id="c<%= comment.id %>">
<small class='text-muted'>
<%= t comment.visible ? ".comment_by_html" : ".hidden_comment_by_html",
- :time_ago => friendly_date_ago(comment.created_at),
+ :time_ago => link_to(friendly_date_ago(comment.created_at), "https://www.openstreetmap.org/changeset/#{@changeset.id}##{comment.id}"),
</pre>
<p dir="auto">You can generally get the path to an object using <code class="notranslate">*_path</code> helpers, e.g. <code class="notranslate">changeset_path</code>. So <code class="notranslate">changeset_path(changeset)</code> will link to the changeset. If you need an anchor (i.e. a <code class="notranslate">#something</code> in the url) then have a look through the views for other places that use the word "anchor", like for diary entry comments.</p>
<p dir="auto">You will also find that in some circumstances you can simplify the <code class="notranslate">link_to("foo", changeset_path(changeset)) further, since (most of the time) rails knows how to build a path for an object, e.g. </code>link_to("foo", changeset)`. You can check other places in the existing codebase to learn what works.</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/4789#discussion_r1599960939">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLJAI6CSSZ5HC2X2VDZCIA6NAVCNFSM6AAAAABHV2JJRCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANJVGI2DMMRWGI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKJH4CHYF72DA6DPVLZCIA6NA5CNFSM6AAAAABHV2JJRCWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTT2QCI3M.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/4789/review/2055246262</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/4789#discussion_r1599960939",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4789#discussion_r1599960939",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>