Class: ActiveAdmin::ResourceController
- Inherits:
-
BaseController
- Object
- InheritedResources::Base
- BaseController
- ActiveAdmin::ResourceController
- Extended by:
- ResourceClassMethods
- Includes:
- ActionBuilder, DataAccess, Decorators, 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/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, ResourceClassMethods, Scoping, Sidebars, Streaming
Constant Summary
Constants included from DataAccess
DataAccess::COLLECTION_APPLIES
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 ViewHelpers::DownloadFormatLinksHelper
#build_download_format_links, #build_download_formats
Methods included from Sidebars
#skip_sidebar!, #skip_sidebar?
Methods included from Streaming
#csv_builder, #csv_filename, #index, #stream_csv, #stream_resource
Methods included from Scoping
#begin_of_association_chain, #method_for_association_chain
Methods included from DataAccess
#apply_authorization_scope, #apply_decorations, #apply_filtering, #apply_includes, #apply_pagination, #apply_scoping, #apply_sorting, #assign_attributes, #build_new_resource, #build_resource, #collection, #collection_applies, #collection_before_scope, #configured_per_page, #create_resource, #current_scope, #destroy_resource, #dynamic_per_page, #find_collection, #find_resource, #per_page, #permitted_attr_names, #permitted_params, #resource, #save_resource, #scoped_collection, #smart_resource_url, #update_resource
Methods included from Decorators
#apply_collection_decorator, #apply_decorator, undecorate
Methods inherited from BaseController
#only_render_implemented_actions
Methods included from BaseController::Menu
#current_menu, #set_current_tab
Methods included from BaseController::Authorization
#action_to_permission, #active_admin_authorization, #active_admin_authorization_adapter, #authorize!, #authorize_resource!, #authorized?, #dispatch_active_admin_access_denied, #redirect_backwards_or_to_root, #rescue_active_admin_access_denied
Class Method Details
.active_admin_config=(config) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/active_admin/resource_controller.rb', line 25 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.
36 37 38 39 |
# File 'lib/active_admin/resource_controller.rb', line 36 def self.inherited(base) super(base) base.override_resource_class_methods! end |