Class: ActiveAdmin::ResourceController
- Inherits:
-
BaseController
- Object
- InheritedResources::Base
- BaseController
- ActiveAdmin::ResourceController
- Extended by:
- ResourceClassMethods
- Includes:
- ActionBuilder, DataAccess, Decorators, PolymorphicRoutes, Scoping, Streaming
- Defined in:
- app/controllers/active_admin/resource_controller.rb,
app/controllers/active_admin/resource_controller/scoping.rb,
app/controllers/active_admin/resource_controller/streaming.rb,
app/controllers/active_admin/resource_controller/decorators.rb,
app/controllers/active_admin/resource_controller/data_access.rb,
app/controllers/active_admin/resource_controller/action_builder.rb,
app/controllers/active_admin/resource_controller/polymorphic_routes.rb,
app/controllers/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, 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
21 22 23 24 25 26 27 |
# File 'app/controllers/active_admin/resource_controller.rb', line 21 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.
32 33 34 35 |
# File 'app/controllers/active_admin/resource_controller.rb', line 32 def self.inherited(base) super(base) base.override_resource_class_methods! end |