Sha256: 3d4b0c1464c8972c3da3158a8bb714cb13315af30ac1fe7abda6ab27fef19e16
Contents?: true
Size: 728 Bytes
Versions: 4
Compression:
Stored size: 728 Bytes
Contents
class Trestle::AdminController < Trestle::ApplicationController if respond_to?(:raise_on_missing_callback_actions=) self.raise_on_missing_callback_actions = false end def index end class << self attr_reader :admin private def local_prefixes return admin.view_path_prefixes if admin [controller_path.sub(/\/$/, "")] end end def admin @_admin ||= self.class.admin.new(self) end helper_method :admin protected def breadcrumbs @_breadcrumbs ||= admin.breadcrumbs.dup end def flash_message(type, title:, message:) { title: admin.t("flash.#{type}.title", default: title), message: admin.t("flash.#{type}.message", default: message) } end end
Version data entries
4 entries across 4 versions & 1 rubygems