Sha256: 5306164300acae0cdab8fe42789c19259b7053b54fb0b6e0eeeb34ae5785f2fb
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
# Breadcrumble Breadcrumble is a simple breadcrumb navigation plugin for Ruby on Rails 3. ## Installation Add this line to your application's Gemfile: gem 'breadcrumble' And then execute: $ bundle Or install it yourself as: $ gem install breadcrumble ## Usage ### Controller In your controller, call `add_crumb` to push a new crumb on the breadcrumb stack. class SampleController add_crumb "home", home_url add_crumb "sample", sample_url def index add_crumb "index", index_url end end Second arugment passed url_for method for convenient use, except specify nil. ### View In your view, you can render the breadcrumb navigation with the `render_breadcrumbs` helper. <body> <%= render_breadcrumbs %> </body> ### Customizing layout Breadcrumble generates default partial template for your app. Generate template. Run the follwoing. $ rails g breadcrumble:views then edit the partials in your app's `app/views/breadcrumble/` directory. ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
breadcrumble-1.0.1 | README.md |