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
Instance Method Summary collapse
- #add_breadcrumb(title: nil, path: nil, avatar: nil, initials: nil, icon: nil) ⇒ Object
- #avo_breadcrumbs ⇒ Object
Instance Method Details
#add_breadcrumb(title: nil, path: nil, avatar: nil, initials: nil, icon: nil) ⇒ Object
28 29 30 |
# File 'lib/avo/concerns/breadcrumbs.rb', line 28 def (title: nil, path: nil, avatar: nil, initials: nil, icon: nil) << Crumb.new(title:, path:, avatar:, initials:, icon:) end |
#avo_breadcrumbs ⇒ Object
32 33 34 |
# File 'lib/avo/concerns/breadcrumbs.rb', line 32 def @avo_breadcrumbs ||= [] end |