Sha256: 5fea1f8ff326d8fc9ae889f33ff0ac7e9c3923495b10d7dac998152bdc18b398

Contents?: true

Size: 454 Bytes

Versions: 6

Compression:

Stored size: 454 Bytes

Contents

module Adminpanel
  module BreadcrumbsHelper

    def breadcrumb_add(title, url)
      initialize_breadcrumb << { title: title, url: url }
    end

    def render_breadcrumb(divider)
      render partial: 'adminpanel/shared/breadcrumb', locals: { nav: initialize_breadcrumb, divider: divider }
    end

    private
    def initialize_breadcrumb
      @breadcrumb ||= [{ title: I18n.t('breadcrumb.index'), url: adminpanel.root_url }, ]
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
adminpanel-2.4.3 app/helpers/adminpanel/breadcrumbs_helper.rb
adminpanel-2.4.2 app/helpers/adminpanel/breadcrumbs_helper.rb
adminpanel-2.4.1 app/helpers/adminpanel/breadcrumbs_helper.rb
adminpanel-2.4.0 app/helpers/adminpanel/breadcrumbs_helper.rb
adminpanel-2.3.1 app/helpers/adminpanel/breadcrumbs_helper.rb
adminpanel-2.3.0 app/helpers/adminpanel/breadcrumbs_helper.rb