Sha256: 64f405628fc14ca359ae001f576b7b7111a0e47930ad6f980c929ce6f46ccf68

Contents?: true

Size: 435 Bytes

Versions: 6

Compression:

Stored size: 435 Bytes

Contents

module Trestle
  module Controller
    module Breadcrumbs
      extend ActiveSupport::Concern

      included do
        helper_method :breadcrumbs
        helper_method :breadcrumb
      end

    protected
      def breadcrumbs
        @breadcrumbs ||= Trestle::Breadcrumb::Trail.new(Trestle.config.root_breadcrumbs)
      end

      def breadcrumb(label, path=nil)
        breadcrumbs.append(label, path)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
trestle-0.8.12 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.8.11 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.8.10 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.8.9 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.8.8 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.8.7 app/controllers/concerns/trestle/controller/breadcrumbs.rb