Class: Resource::BaseController
- Inherits:
-
Object
- Object
- Resource::BaseController
show all
- Includes:
- Controller::CollectionLinksConcern, 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
#create, #destroy, #edit, #index, #new, #show, #update
#authorize, #engine_policy
Class Method Details
.resource_class ⇒ Object
33
34
35
|
# File 'app/controllers/itsf/backend/resource/base_controller.rb', line 33
def self.resource_class
name.gsub('Controller', '').singularize.constantize
end
|
.resource_count ⇒ Object
37
38
39
|
# File 'app/controllers/itsf/backend/resource/base_controller.rb', line 37
def self.resource_count
resource_class.count
end
|
Instance Method Details
#resource_class ⇒ Object
41
42
43
|
# File 'app/controllers/itsf/backend/resource/base_controller.rb', line 41
def resource_class
self.class.resource_class
end
|