I’m currently using
<li><%= link_to_unless_current("Home", root_path) %></li>
to show a Home link on the nav bar when they are not at the root path. It works fine except it leaves behind the text “Home” (not the link, just text) when they are at the root path.
I’m sure there’s a better way to do this, any tips?
1 Answer