Releases: bxt/nav_links
Releases · bxt/nav_links
v1.1.0 Featuring Simplified Grouping
The syntax for grouping navigational links was simplified to reduce duplication, from:
<ul class="nav">
<% nav_links url_segment: 1, wrapper: 'li', selected_class:'active' do |nav| %>
<%= nav.nav_link_to "Projects", projects_path %>
<%= nav.nav_link_to "People", people_path %>
<%= nav.nav_link_to "About", about_path %>
<% end %>
</ul>
To:
<ul class="nav">
<% nav_links url_segment: 1, wrapper: 'li', selected_class:'active' do |nav| %>
<%= nav.link_to "Projects", projects_path %>
<%= nav.link_to "People", people_path %>
<%= nav.link_to "About", about_path %>
<% end %>
</ul>
Basically the nav_link_to
method is now named only link_to
inside of blocks. Note that you can still access rails' link_to method if you leave out the nav.
part. The old method name is still supported until the 2.x release, so you can update now and take your time migrating.
v1.0.0 Intital Release
All the things from nav_lynx should still work and be tested, and the block grouping was added.