Sha256: cf614db39a92a1ef043e4231fa75bb659bc88906d2b932ddb58f1da37ba02109
Contents?: true
Size: 1.63 KB
Versions: 1
Compression:
Stored size: 1.63 KB
Contents
require 'gretel/version' require 'gretel/crumbs' require 'gretel/crumb' require 'gretel/link' require 'gretel/view_helpers' require 'gretel/deprecated' module Gretel class << self # Returns the path from with breadcrumbs are loaded. Default is +config/breadcrumbs.rb+. def breadcrumb_paths @breadcrumb_paths ||= [Rails.root.join("config", "breadcrumbs.rb"), Rails.root.join("config", "breadcrumbs", "**", "*.rb")] end # Sets the path from with breadcrumbs are loaded. Default is +config/breadcrumbs.rb+. def breadcrumb_paths=(paths) @breadcrumb_paths = paths end # Whether to suppress deprecation warnings. def suppress_deprecation_warnings? !!@suppress_deprecation_warnings end # Sets whether to suppress deprecation warnings. def suppress_deprecation_warnings=(value) @suppress_deprecation_warnings = value end # Shows a deprecation warning. def show_deprecation_warning(message) return if suppress_deprecation_warnings? puts message Rails.logger.warn message end # Array of Rails environment names with automatic configuration reload. Default is +["development"]+. def reload_environments @reload_environments ||= ["development"] end # Sets the Rails environment names with automatic configuration reload. Default is +["development"]+. attr_writer :reload_environments # Resets all changes made to +Gretel+ and +Gretel::Crumbs+. Used for testing. def reset! instance_variables.each { |var| remove_instance_variable var } Crumbs.reset! end end end ActionView::Base.send :include, Gretel::ViewHelpers
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gretel-2.1.0 | lib/gretel.rb |