Module: Panoptic::BreadcrumbsHelper

Included in:
ApplicationHelper
Defined in:
app/helpers/panoptic/breadcrumbs_helper.rb

Instance Method Summary collapse

Instance Method Details



5
6
7
# File 'app/helpers/panoptic/breadcrumbs_helper.rb', line 5

def breadcrumb_items
  @breadcrumb_items ||= []
end


9
10
11
12
13
14
15
16
17
# File 'app/helpers/panoptic/breadcrumbs_helper.rb', line 9

def breadcrumbs
  tag.nav(aria: { label: "breadcrumb" }) do
    tag.ol(class: "breadcrumb") do
      breadcrumb_items.map do |item|
        concat tag.li(item, class: "breadcrumb-item")
      end
    end
  end
end