Module: ActiveAdmin::Resource::Controllers

Included in:
Page, ActiveAdmin::Resource
Defined in:
lib/active_admin/resource/controllers.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) controller

Returns the controller for this config



12
13
14
# File 'lib/active_admin/resource/controllers.rb', line 12

def controller
  @controller ||= controller_name.constantize
end

- (Object) controller_name

Returns a properly formatted controller name for this config within its namespace



7
8
9
# File 'lib/active_admin/resource/controllers.rb', line 7

def controller_name
  [namespace.module_name, resource_name.plural.camelize + "Controller"].compact.join('::')
end