An open API service indexing awesome lists of open source software.

https://github.com/ream88/simple_menu

Super simple and bulletproof menus for your rails app.
https://github.com/ream88/simple_menu

Last synced: 5 months ago
JSON representation

Super simple and bulletproof menus for your rails app.

Awesome Lists containing this project

README

          

# SimpleMenu

## Installation

In your `Gemfile`:

```ruby
gem 'simple_menu'
```

## Usage

In your helpers:

```ruby
menu = simple_menu do
link_to 'Users', users_path
end

menu.add do
link_to 'New User', new_user_path
end

menu.after('Users') do
link_to 'Invite User', invite_user_path
end

menu.before('/users/new') do
link_to 'Admin Users', admin_users_path if current_user.is_admin?
end
```

## Contributing to simple_menu

* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the [issue tracker](https://github.com/haihappen/simple_menu/issues) to make sure someone already hasn't requested it and/or contributed it
* Fork the project
* Start a feature/bugfix branch
* Commit and push until you are happy with your contribution
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

## Copyright

(The MIT license)

Copyright (c) 2012 Mario Uher

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.