weppos/breadcrumbs_on_rails — pull request #41 by nzaillian (2013-03-02 10:21:05+00:00)
Title: "config" object for setting defaults

I was using breadcrumbs_on_rails along with a twitter bootstrap-friendly builder (https://gist.github.com/riyad/1933884) and it felt tedious and wrong explicitly passing the "builder" and "separator" options to every "render_breadcrumbs" invocation when these things weren't changing, so I added a Breadcrumbs "config" module member (and supporting logic to the view helpers and SimpleBuilder) so that I could just stick this in an initializer:

# config/initializers/breadcrumbs_on_rails.rb
BreadcrumbsOnRails::Breadcrumbs::config.builder = ::BootstrapBreadcrumbsBuilder
BreadcrumbsOnRails::Breadcrumbs::config.separator = "»"

Merge if you see fit.