Module: Loaf::ControllerExtensions::InstanceMethods
- Defined in:
- lib/loaf/controller_extensions.rb
Overview
ClassMethods
Instance Method Summary collapse
-
#_breadcrumbs ⇒ Object
private
Collection of breadcrumbs.
-
#breadcrumb(name, url, options = {}) ⇒ Object
(also: #add_breadcrumb)
Add breadcrumb in controller as instance method.
-
#clear_breadcrumbs ⇒ Object
Remove all current breadcrumbs.
Instance Method Details
#_breadcrumbs ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Collection of breadcrumbs
77 78 79 |
# File 'lib/loaf/controller_extensions.rb', line 77 def @_breadcrumbs ||= [] end |
#breadcrumb(name, url, options = {}) ⇒ Object Also known as:
Add breadcrumb in controller as instance method
69 70 71 |
# File 'lib/loaf/controller_extensions.rb', line 69 def (name, url, = {}) << Loaf::Crumb.new(name, url, ) end |
#clear_breadcrumbs ⇒ Object
Remove all current breadcrumbs
84 85 86 |
# File 'lib/loaf/controller_extensions.rb', line 84 def .clear end |