= Overview {}[http://travis-ci.org/bkuhlmann/navigator] Enhances Rails with a DSL for menu navigation. = Features * A simple DSL for creating navigation menus. * Supports sub-menus, nested tags, HTML attributes, etc. * Supports the following HTML tags: ul, li, a, b, em, s, small, span, strong, sub, and sup. * Provides the "item" convenience method which combines the "li" and "a" HTML tags into a single method for less typing. = Requirements 1. {Ruby 1.9.x}[http://www.ruby-lang.org]. 2. {Ruby on Rails}[http://rubyonrails.org]. = Setup Type the following from the command line to install: gem install navigator Add the following to your Gemfile: gem "navigator" = Usage The following are examples using the render_navigation view helper: == Unordered List (simple) render_navigation do item "Dashboard", "/dashboard" item "News", "/posts" end Yields:
== Unordered List (with attributes) render_navigation "ul", class: "nav" do item "Dashboard", "/dashboard", class: "active" item "News", "/posts" end Yields: == Nav (with links) render_navigation "nav" do a "Dashboard", href: "/dashboard" a "News", href: "/posts" end Yields: = Tests To test, do the following: 1. cd to the gem root. 2. bundle install 3. bundle exec rspec spec = Contributions Please log all feedback/issues via {GitHub Issues}[https://github.com/bkuhlmann/navigator/issues]. Thanks. = Credits Developed by {Brooke Kuhlmann}[http://www.redalchemist.com] at {Red Alchemist}[http://www.redalchemist.com] = License Copyright (c) 2012 {Red Alchemist}[http://www.redalchemist.com]. Read the LICENSE for details. = History Read the CHANGELOG for details. Built with Gemsmith[https://github.com/bkuhlmann/gemsmith].