Sha256: 79b39964ea012273e79d903ba7de134b8a02610d2a83bc38df4fa93ddb667fbe

Contents?: true

Size: 489 Bytes

Versions: 13

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

require "active_support/concern"

module Decidim
  module HasSpecificBreadcrumb
    extend ActiveSupport::Concern

    included do
      before_action :set_breadcrumb_item

      private

      def breadcrumb_item
        raise NotImplementedError, "Breadcrumb item needs definition"
      end

      def set_breadcrumb_item
        @context_breadcrumb_items ||= breadcrumb_item.is_a?(Array) ? breadcrumb_item : [breadcrumb_item]
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-core-0.29.1 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.28.4 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.29.0 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.28.3 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.29.0.rc4 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.29.0.rc3 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.29.0.rc2 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.29.0.rc1 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.28.2 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.28.1 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.28.0 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.28.0.rc5 app/controllers/concerns/decidim/has_specific_breadcrumb.rb
decidim-core-0.28.0.rc4 app/controllers/concerns/decidim/has_specific_breadcrumb.rb