Improve Your Rails App's Navigation with link_to_unless_current
In Rails, the link_to
helper is used to generate HTML links. But what if you want a link to only appear if the current page isn’t the one it points to? That’s where link_to_unless_current
comes in.