Sha256: 17f17e2a8d64498984851dfe24eac23e0282eea14acf2d7b9daf5f72e05be56f

Contents?: true

Size: 427 Bytes

Versions: 11

Compression:

Stored size: 427 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

11 entries across 11 versions & 1 rubygems

Version Path
trestle-0.10.1 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.10.0 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.10.0.pre2 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.10.0.pre app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.9.8 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.9.7 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.9.6 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.9.5 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.9.4 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.9.3 app/controllers/concerns/trestle/controller/breadcrumbs.rb
trestle-0.9.2 lib/trestle/controller/breadcrumbs.rb