Class: ActiveAdmin::BaseController

Inherits:
InheritedResources::Base
  • Object
show all
Includes:
Menu
Defined in:
lib/active_admin/base_controller.rb,
lib/active_admin/base_controller/menu.rb

Overview

BaseController for ActiveAdmin. It implements ActiveAdmin controllers core features.

Direct Known Subclasses

PageController, ResourceController

Defined Under Namespace

Modules: Menu

Class Attribute Summary collapse

Instance Method Summary collapse

Methods included from Menu

#current_menu, #set_current_tab

Class Attribute Details

.active_admin_configObject

Reference to the Resource object which initialized this controller



21
22
23
# File 'lib/active_admin/base_controller.rb', line 21

def active_admin_config
  @active_admin_config
end

Instance Method Details

#only_render_implemented_actionsObject

By default Rails will render un-implemented actions when the view exists. Becuase Active Admin allows you to not render any of the actions by using the #actions method, we need to check if they are implemented.

Raises:

  • (AbstractController::ActionNotFound)


27
28
29
# File 'lib/active_admin/base_controller.rb', line 27

def only_render_implemented_actions
  raise AbstractController::ActionNotFound unless action_methods.include?(params[:action])
end