This gem is for useful menu generation and attaching controllers methods to specific menu items to highlight them.
Add this line to your application's Gemfile:
gem 'menuseful'
And then execute:
$ bundle
Or install it yourself as:
$ gem install menuseful
include ::Menuseful::Item
menu_item :your_menu_item_code # specify attached menu item
menu_item [:top_menu_item_code, :sub_item_code] # you can have submenu
link_to_menu :your_menu_item_code, "My Item Name", url, options # for link to menu
link_to_menu [:top_menu_item_code, :sub_item_code], "My SubItem Name", url, options # for link to submenu
- Fork it ( https://github.com/[my-github-username]/menuseful/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request