Articles tagged 'simple-navigation'

  • Generating your site menu with the 'simple-navigation' gem

    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 Gemfile:

    gem 'simple-navigation'

    Then, run 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.rb file, and add your…

    Continue Reading →