Sha256: 156d5528deb954c8b326d64dd50eddbd6d4c37a840e3addcb1613af090159270

Contents?: true

Size: 1020 Bytes

Versions: 3

Compression:

Stored size: 1020 Bytes

Contents

module Gretel
  module Crumbs
    class << self
      # Lay out the breadcrumbs.
      # Deprecated since v2.1.0. Put breadcrumbs in +config/breadcrumbs.rb+ instead (see https://github.com/lassebunk/gretel/blob/master/README.md for details).
      #
      # Example:
      #   Gretel::Crumbs.layout do
      #     crumb :root do
      #       link "Home", root_path
      #     end
      #   end
      def layout(&block)
        Gretel.show_deprecation_warning(
          "Gretel::Crumbs.layout has been deprecated and will be removed in Gretel version 3.0. " +
          "Please put your breadcrumbs in `config/breadcrumbs.rb`. " +
          "This will also automatically reload your breadcrumbs when you change them in the development environment. " +
          "See https://github.com/lassebunk/gretel/blob/master/README.md for details.")
        @deprecated_breadcrumbs_block = block
      end

      def deprecated_breadcrumbs_block
        @deprecated_breadcrumbs_block ||= Proc.new {}
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gretel-2.2.0.rc2 lib/gretel/deprecated.rb
gretel-2.2.0.rc1 lib/gretel/deprecated.rb
gretel-2.1.0 lib/gretel/deprecated.rb