<commit_before># Loaf [![Build Status](https://secure.travis-ci.org/peter-murach/loaf.png?branch=master)][travis] [![Dependency Status](https://gemnasium.com/peter-murach/loaf.png?travis)][gemnasium]

[travis]: http://travis-ci.org/peter-murach/loaf
[gemnasium]: https://gemnasium.com/peter-murach/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:

```ruby
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:
<commit_msg>Update markdown.<commit_after># Loaf [![Build Status](https://secure.travis-ci.org/peter-murach/loaf.png?branch=master)][travis] [![Dependency Status](https://gemnasium.com/peter-murach/loaf.png?travis)][gemnasium]

[travis]: http://travis-ci.org/peter-murach/loaf
[gemnasium]: https://gemnasium.com/peter-murach/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:

```ruby
gem install loaf
```

Add to your Gemfile:

```ruby
gem 'loaf'
```

## Configuration

There is a small set of custom opinionated defaults. However, to override them in your views just pass an option hash. The following options are valid:

```ruby
:crumb_length  # integer, default length is 30 characters
:root          # boolean, default is true, displays the home crumb
```

## Usage

In controller:

```ruby
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:

{'fraction_non_alphanumeric': 0.10246052148365772, 'fraction_numerical': 0.0014689680499449136, 'mean_word_length': 4.896103896103896, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3329761', 'n_tokens_mistral': 852, 'n_tokens_neox': 829, 'n_words': 281}