Sha256: 094bfbc6d6172d587d17b2e865d97601aa04be2785fe263459d233101179df97

Contents?: true

Size: 614 Bytes

Versions: 6

Compression:

Stored size: 614 Bytes

Contents

module ActiveAdmin

  # All Pages controllers inherit from this controller.
  class PageController < BaseController

    # Active admin actions don't require layout.  All custom actions do.
    ACTIVE_ADMIN_ACTIONS = [:index]

    actions :index

    before_action :authorize_access!

    def index(options={}, &block)
      render "active_admin/page/index"
    end

    def clear_page_actions!
      active_admin_config.clear_page_actions!
    end

    private

    def authorize_access!
      permission = action_to_permission(params[:action])
      authorize! permission, active_admin_config
    end

  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
yousty-activeadmin-1.0.17.pre lib/active_admin/page_controller.rb
yousty-activeadmin-1.0.16.pre lib/active_admin/page_controller.rb
yousty-activeadmin-1.0.15.pre lib/active_admin/page_controller.rb
activeadmin-1.0.0 lib/active_admin/page_controller.rb
yousty-activeadmin-1.0.14.pre lib/active_admin/page_controller.rb
yousty-activeadmin-1.0.13.pre lib/active_admin/page_controller.rb