Module: Booties::BreadcrumbHelper

Defined in:
app/helpers/booties/breadcrumb_helper.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

Renders an ol tag with the “breadcrumb” class and fills it with the content of the block.

Example:

<% breadcrumbs do %>
  <li>Foo</li>
  <li class="active">Bar</li>
<% end %>
<%= yield :breadcrumb %>

<ol class="breadcrumb">
  <li>Foo</li>
  <li class="active">Bar</li>
</ol>


21
22
23
# File 'app/helpers/booties/breadcrumb_helper.rb', line 21

def breadcrumbs(&block)
  content_for :breadcrumbs, render_breadcrumbs(&block)
end

#render_breadcrumbs(&block) ⇒ Object

:nodoc:



25
26
27
# File 'app/helpers/booties/breadcrumb_helper.rb', line 25

def render_breadcrumbs(&block) # :nodoc:
   :ol, class: 'breadcrumb', &block
end