Class: Resource::BaseController
- Inherits:
-
Object
- Object
- Resource::BaseController
show all
- Includes:
- Controller::BreadcrumbsConcern, Controller::CollectionLinksConcern, Controller::CurrentEngineConcern, Controller::FeatureFlagsConcern, Controller::JsonApiConcern, Controller::PaginationConcern, Controller::PunditAuthorizationFailureHandlingConcern, Controller::PunditNamespacedAuthorizeConcern, Controller::RansackConcern, Controller::ResourceInflectionsConcern, Controller::ResourceLinksConcern, Controller::ResourceUrlsConcern, Controller::RestActionsConcern, Controller::RestActionsConcernWithPundit, Pundit
- Defined in:
- app/controllers/itsf/backend/resource/base_controller.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#breadcrumbs, #breadcrumbs!
#create, #destroy, #edit, #index, #new, #show, #update
#authorize, #engine_policy
Class Method Details
.resource_class ⇒ Object
35
36
37
|
# File 'app/controllers/itsf/backend/resource/base_controller.rb', line 35
def self.resource_class
name.gsub('Controller', '').singularize.constantize
end
|
.resource_count ⇒ Object
39
40
41
|
# File 'app/controllers/itsf/backend/resource/base_controller.rb', line 39
def self.resource_count
resource_class.count
end
|
Instance Method Details
#resource_class ⇒ Object
43
44
45
|
# File 'app/controllers/itsf/backend/resource/base_controller.rb', line 43
def resource_class
self.class.resource_class
end
|