Class: ActiveAdmin::ResourceController
- Inherits:
-
BaseController
- Object
- InheritedResources::Base
- BaseController
- ActiveAdmin::ResourceController
- Extended by:
- ResourceClassMethods
- Includes:
- ActionBuilder, DataAccess, Decorators, PolymorphicRoutes, Scoping, Sidebars, Streaming, ViewHelpers::DownloadFormatLinksHelper
- Defined in:
- lib/active_admin/resource_controller.rb,
lib/active_admin/resource_controller/scoping.rb,
lib/active_admin/resource_controller/sidebars.rb,
lib/active_admin/resource_controller/streaming.rb,
lib/active_admin/resource_controller/decorators.rb,
lib/active_admin/resource_controller/data_access.rb,
lib/active_admin/resource_controller/action_builder.rb,
lib/active_admin/resource_controller/polymorphic_routes.rb,
lib/active_admin/resource_controller/resource_class_methods.rb
Overview
All Resources Controller inherits from this controller. It implements actions and helpers for resources.
Defined Under Namespace
Modules: ActionBuilder, DataAccess, Decorators, PolymorphicRoutes, ResourceClassMethods, Scoping, Sidebars, Streaming
Constant Summary
Constants included from BaseController::Authorization
BaseController::Authorization::ACTIONS_DICTIONARY
Class Method Summary collapse
- .active_admin_config=(config) ⇒ Object
-
.inherited(base) ⇒ Object
Inherited Resources uses the ‘self.inherited(base)` hook to add in `self.resource_class`.
Methods included from ResourceClassMethods
override_resource_class_methods!
Methods included from Streaming
Methods included from PolymorphicRoutes
#polymorphic_path, #polymorphic_url
Methods included from DataAccess
Class Method Details
.active_admin_config=(config) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/active_admin/resource_controller.rb', line 31 def self.active_admin_config=(config) if @active_admin_config = config defaults resource_class: config.resource_class, route_prefix: config.route_prefix, instance_name: config.resource_name.singular end end |
.inherited(base) ⇒ Object
Inherited Resources uses the ‘self.inherited(base)` hook to add in `self.resource_class`. To override it, we need to install our resource_class method each time we’re inherited from.
42 43 44 45 |
# File 'lib/active_admin/resource_controller.rb', line 42 def self.inherited(base) super(base) base.override_resource_class_methods! end |