No commit activity in last 3 years
No release in over 3 years
Menu Helper
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

SimpleMenu

A simple menu builder

Build Status Coverage Status Code Climate Dependency Status Gem Version

Instalation

Add this line to your application's Gemfile:

gem 'very_simple_menu'

And then execute:

$ bundle

Run bundle install

Usage

Layout (or even view)

<%= simple_menu.add({
  :products => ["Products", "/products"],
  :services => ["Services", "/services"],
}) %>

View

# app/views/products/show.html.erb
<% simple_menu.active = :products %>

renders

<ul>
  <li><a href="/products">Products</a></li>
  <li><a href="/services">Services</a></li>
</ul>

Aditional Menus

<% simple_menu('sidebar').active = :all %>

<%= simple_menu('sidebar').add({
  :all => ["All", "/products"],
  :most_viewed => ["Most Viewed", "/products/most-viewed"],
}) %>

Author

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature) Do not forget to write tests
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request