[openstreetmap/openstreetmap-website] Add permalinks to changeset comments (PR #4789)

Holger Jeromin notifications at github.com
Tue May 14 11:36:58 UTC 2024


@HolgerJeromin commented on this pull request.



> @@ -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}"),

```suggestion
                  :time_ago => link_to(friendly_date_ago(comment.created_at), "/changeset/#{@changeset.id}##{comment.id}"),
```
But there are probably more rail-ish ways to create that url....

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4789#pullrequestreview-2055092189
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4789/review/2055092189 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240514/ea003e3f/attachment.htm>


More information about the rails-dev mailing list