[openstreetmap/openstreetmap-website] sync location hash on the "History" link in header navigation (PR #7062)

Martin Raifer notifications at github.com
Thu May 7 13:52:05 UTC 2026


@tyrasd commented on this pull request.



> @@ -36,7 +36,7 @@
     <ul id="secondary-nav-menu" class="nav flex-grow-1 justify-content-center justify-content-md-start" data-turbo-permanent>
       <% secondary_nav_items.each do |path, label, options| %>
         <li class="nav-item pb-2 pb-md-0">
-          <%= link_to label, path, :class => ["nav-link", "px-1", "py-0", current_page?(path) ? "active text-secondary-emphasis" : "text-secondary"], **(options || {}) %>
+          <%= link_to label, path, **(options || {}), :class => ["nav-link", "px-1", "py-0", current_page?(path) ? "active text-secondary-emphasis" : "text-secondary"] + (options&.dig(:class) || []) %>

pretty sure there must be a more elegant way to do this, but it works 🤷 

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

Message ID: <openstreetmap/openstreetmap-website/pull/7062/review/4244547914 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260507/94de5a00/attachment.htm>


More information about the rails-dev mailing list