Sha256: 7dd88cdf854f51f49f3400828247406cfce4d4a6264e70d043163abc502da809

Contents?: true

Size: 616 Bytes

Versions: 4

Compression:

Stored size: 616 Bytes

Contents

class Trestle::AdminController < Trestle::ApplicationController
  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

Version Path
trestle-0.9.8 app/controllers/trestle/admin_controller.rb
trestle-0.9.7 app/controllers/trestle/admin_controller.rb
trestle-0.9.6 app/controllers/trestle/admin_controller.rb
trestle-0.9.5 app/controllers/trestle/admin_controller.rb