Skip to content

Commit

Permalink
fix: List Rails versions correctly in navigation menu
Browse files Browse the repository at this point in the history
  • Loading branch information
toshimaru committed Oct 12, 2023
1 parent 66e53a8 commit 3d1944e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@
v{{ page.version }}
</a>
<div class="dropdown-menu dropdown-menu-md-right" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="/">v7.0</a>
{% for rails_version in site.rails_versions %}
{% assign version = rails_version.first %}
<a class="dropdown-item" href="/{{ version }}/">v{{ version }}</a>
{% assign version = rails_version[0] %}
{% assign detail = rails_version[1] %}
{% if detail.latest %}
<a class="dropdown-item" href="/">v{{ version }}</a>
{% else %}
<a class="dropdown-item" href="/{{ version }}/">v{{ version }}</a>
{% endif %}
{% endfor %}
</div>
</div>
Expand Down

0 comments on commit 3d1944e

Please sign in to comment.