Sha256: 0c7420c9afbb06e6c33553c3e7e9c41c6f546c430d311c9b432c42c3da621fff

Contents?: true

Size: 426 Bytes

Versions: 3

Compression:

Stored size: 426 Bytes

Contents

module Trestle
  module Controller
    module Breadcrumbs
      extend ActiveSupport::Concern

      included do
        helper_method :breadcrumbs
        helper_method :breadcrumb
      end

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trestle-0.9.1 lib/trestle/controller/breadcrumbs.rb
trestle-0.9.0 lib/trestle/controller/breadcrumbs.rb
trestle-0.8.13 lib/trestle/controller/breadcrumbs.rb