= Loaf Breadcrumbs creation library. * Helps in creating breadcrumbs. * Uses controllers to specify names and routes for parts of breadcrum trails or collections of breadcrumbs. * Stays out of your way when it comes to markup exposing only single helper method to access breadcrumb data. == Installation Install from source: gem install loaf Add to your Gemfile: gem 'loaf' == Configuration There is small set of custom opinionated defaults. However, to override them in your views just pass an option hash. The following options are valid: :crumb_length # integer, default length is 30 characters :root # boolean, default is true, displays the home crumb == Usage In controller: class Blog::CategoriesController < ApplicationController add_breadcrumb 'Article Categories', 'blog_categories_path', :only => [:show] def show add_breadcrumb "#{@category.title}", 'blog_category_path(@category)' end end You can add breadcrumbs for nested resources, for instance, article categories: You can add semantic markup in your view to show breadcrumbs
== TODO * Add ability to add breadcrumbs for nested resources * Add support for name internationalisation * Finish specs == Contributing to loaf * 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 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 Copyright (c) 2011 Piotr Murach. See LICENSE.txt for further details.