Class: NfgUi::Bootstrap::Components::BreadcrumbItem
- Includes:
- Utilities::Activatable
- Defined in:
- lib/nfg_ui/bootstrap/components/breadcrumb_item.rb
Overview
Bootstrap Breadcrumb Item Subcomponent of Breadcrumb getbootstrap.com/docs/4.1/components/breadcrumb/
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
#body, #options, #view_context
Instance Method Summary collapse
Methods included from Utilities::Activatable
Methods inherited from Base
#data, #href, #html_options, #id, #initialize, #style
Constructor Details
This class inherits a constructor from NfgUi::Bootstrap::Components::Base
Instance Method Details
#component_family ⇒ Object
12 13 14 |
# File 'lib/nfg_ui/bootstrap/components/breadcrumb_item.rb', line 12 def component_family :breadcrumb end |
#render ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/nfg_ui/bootstrap/components/breadcrumb_item.rb', line 16 def render if href # remove href from options hash so it does not # get added to the parent element -- and instead # gets stored so we can use it to build the # inserted <a> tag. delegated_href = .delete(:href) super do view_context.link_to(body, delegated_href) end else super end end |