Articles tagged 'simple-navigation'
January 3, 2012
This post was originally published in the Rambling Labs Blog on January 3, 2012.
One of the cool things I learned while building our new site was how to generate your site navigation menu without having to do the highlighting logic yourself.
There’s a great gem out there for this called
simple-navigation, which you can find on GitHub. It’s easy to set up and use, so you will probably do what you need to do really quick. To install, add it to your rails application
bundle install. After it’s installed, generate the configuration file for it, which will be the
config/navigation.rb, with the following:
rails generate navigation_config
Go ahead and open the
config/navigation.rbfile, and add...