Sha256: 8ea50530570b27132389ce4b5247dc823e817f6cfe1de6a5ace76152e6130a2a

Contents?: true

Size: 616 Bytes

Versions: 40

Compression:

Stored size: 616 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

40 entries across 40 versions & 5 rubygems

Version Path
activeadmin-rails-1.7.1 lib/active_admin/page_controller.rb
activeadmin-rails-1.7.0 lib/active_admin/page_controller.rb
activeadmin-rb-1.6.0 lib/active_admin/page_controller.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/activeadmin-2.9.0/lib/active_admin/page_controller.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/activeadmin-2.9.0/lib/active_admin/page_controller.rb
activeadmin-rb-1.5.2 lib/active_admin/page_controller.rb
activeadmin-2.9.0 lib/active_admin/page_controller.rb
activeadmin-2.8.1 lib/active_admin/page_controller.rb
activeadmin-2.8.0 lib/active_admin/page_controller.rb
activeadmin-rb-1.5.1 lib/active_admin/page_controller.rb
activeadmin-2.7.0 lib/active_admin/page_controller.rb
activeadmin-2.6.1 lib/active_admin/page_controller.rb
activeadmin-2.6.0 lib/active_admin/page_controller.rb
activeadmin-2.5.0 lib/active_admin/page_controller.rb
activeadmin-2.4.0 lib/active_admin/page_controller.rb
activeadmin-2.3.1 lib/active_admin/page_controller.rb
activeadmin-2.3.0 lib/active_admin/page_controller.rb
activeadmin-2.2.0 lib/active_admin/page_controller.rb
activeadmin-2.1.0 lib/active_admin/page_controller.rb
activeadmin-2.0.0 lib/active_admin/page_controller.rb