Sha256: a475a71f545db0b6343dab335044a62feb1cce34a7f282188ee7673355a37c14
Contents?: true
Size: 849 Bytes
Versions: 3
Compression:
Stored size: 849 Bytes
Contents
class Trestle::ApplicationController < ActionController::Base protect_from_forgery layout 'trestle/admin' # Global helpers self.helpers_path += Rails.application.helpers_paths helper Trestle.config.helper_module helper *Trestle.config.helpers # Global callbacks Trestle.config.before_actions.each do |action| before_action(action.options, &action.block) end Trestle.config.after_actions.each do |action| after_action(action.options, &action.block) end Trestle.config.around_actions.each do |action| around_action(action.options, &action.block) end protected def breadcrumbs @breadcrumbs ||= Trestle::Breadcrumb::Trail.new(Trestle.config.root_breadcrumbs) end helper_method :breadcrumbs def breadcrumb(label, path=nil) breadcrumbs.append(label, path) end helper_method :breadcrumb end
Version data entries
3 entries across 3 versions & 1 rubygems