Class: Resource::BaseController

Inherits:
Object
  • Object
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

Methods included from Controller::BreadcrumbsConcern

#breadcrumbs, #breadcrumbs!

Methods included from Controller::RestActionsConcernWithPundit

#create, #destroy, #edit, #index, #new, #show, #update

Methods included from Controller::PunditNamespacedAuthorizeConcern

#authorize, #engine_policy

Class Method Details

.resource_classObject



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_countObject



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_classObject



43
44
45
# File 'app/controllers/itsf/backend/resource/base_controller.rb', line 43

def resource_class
  self.class.resource_class
end