Module: Proscenium::UI::Breadcrumbs::Control::ClassMethods
- Defined in:
- lib/proscenium/ui/breadcrumbs/control.rb
Instance Method Summary collapse
-
#add_breadcrumb(name, path = nil, **filter_options) ⇒ Object
Appends a new breadcrumb element into the collection.
-
#prepend_breadcrumb(name, path = nil, **filter_options) ⇒ Object
Prepend a new breadcrumb element into the collection.
Instance Method Details
#add_breadcrumb(name, path = nil, **filter_options) ⇒ Object
Appends a new breadcrumb element into the collection.
22 23 24 25 26 27 28 |
# File 'lib/proscenium/ui/breadcrumbs/control.rb', line 22 def (name, path = nil, **) = .delete(:options) || {} before_action() do |controller| controller.send :add_breadcrumb, name, path, end end |
#prepend_breadcrumb(name, path = nil, **filter_options) ⇒ Object
Prepend a new breadcrumb element into the collection.
36 37 38 39 40 41 42 |
# File 'lib/proscenium/ui/breadcrumbs/control.rb', line 36 def (name, path = nil, **) = .delete(:options) || {} before_action() do |controller| controller.send :prepend_breadcrumb, name, path, end end |