Module: Avo::Concerns::Breadcrumbs

Extended by:
ActiveSupport::Concern
Included in:
BaseApplicationController
Defined in:
lib/avo/concerns/breadcrumbs.rb

Overview

This is a custom implementation of breadcrumbs largely based on breadcrumbs_on_rails gem created by Simone Carletti (@weppos) and released on MIT license.

github.com/weppos/breadcrumbs_on_rails

The reason to use custom implementation is to

* Avoid naming conflicts with other gems adding helpers like `breadcrumbs`
* Reduce number of dependencies

Defined Under Namespace

Modules: ClassMethods, HelperMethods Classes: Builder, Crumb

Instance Method Summary collapse

Instance Method Details

#add_breadcrumb(name, path = nil) ⇒ Object



79
80
81
# File 'lib/avo/concerns/breadcrumbs.rb', line 79

def add_breadcrumb(name, path = nil)
  avo_breadcrumbs << Crumb.new(name, path)
end

#avo_breadcrumbsObject



83
84
85
# File 'lib/avo/concerns/breadcrumbs.rb', line 83

def avo_breadcrumbs
  @avo_breadcrumbs ||= []
end