Module: NdrUi::Bootstrap::BreadcrumbsHelper
- Included in:
- NdrUi::BootstrapHelper
- Defined in:
- app/helpers/ndr_ui/bootstrap/breadcrumbs_helper.rb
Overview
This mixin provides Bootstrap breadcrumbs helper methods
Instance Method Summary collapse
-
#bootstrap_breadcrumb(title, linkto, active = false) ⇒ Object
Creates a bootstrap breadcrumb.
-
#bootstrap_breadcrumbs(breadcrumbs) ⇒ Object
Creates bootstrap breadcrumbs.
Instance Method Details
#bootstrap_breadcrumb(title, linkto, active = false) ⇒ Object
Creates a bootstrap breadcrumb.
Signatures
(title, linkto, active = false)
Examples
<%= bootstrap_breadcrumb("Fruits", "#fruits", true) %>
# => <li class="active"><a href="#fruits">Fruits</a></li>
33 34 35 36 37 |
# File 'app/helpers/ndr_ui/bootstrap/breadcrumbs_helper.rb', line 33 def (title, linkto, active = false) content_tag('li', link_to(title, linkto), active ? { class: 'active' } : {}) end |
#bootstrap_breadcrumbs(breadcrumbs) ⇒ Object
Creates bootstrap breadcrumbs.
Signatures
()
Examples
<%= bootstrap_breadcrumbs([
bootstrap_breadcrumb("Fruits", "#fruits")
]) %>
# => <ol class="breadcrumb">
<li class="active"><a href="#fruits">Fruits</a></li>
</ol>
19 20 21 |
# File 'app/helpers/ndr_ui/bootstrap/breadcrumbs_helper.rb', line 19 def () content_tag('ol', safe_join(), class: 'breadcrumb') end |