Sha256: 6a10a05d5cfc6210fe7afb36198276e6c648c56cb86df6a4046002e10366a769

Contents?: true

Size: 944 Bytes

Versions: 8

Compression:

Stored size: 944 Bytes

Contents

require 'ransack' if Itsf::Backend.features?(:ransack)
require 'kaminari' if Itsf::Backend.features?(:kaminari)

module Itsf::Backend
  class Service::BaseController < Configuration.service_base_controller.constantize
    if Itsf::Backend.features?(:pundit)
      include Pundit
      include Controller::PunditNamespacedAuthorizeConcern 
      include Controller::PunditAuthorizationFailureHandlingConcern
    end

    include Controller::ServiceInflectionsConcern
    include Controller::ServiceUrlsConcern
    include Controller::ServiceActionsConcern
    include Controller::JsonApiConcern
    include Controller::FeatureFlagsConcern
    helper Itsf::Backend::ApplicationHelper
    helper Itsf::Backend::BootstrapHelper

    layout 'itsf/backend/base'

    helper_method :service_class

    def self.service_class
      name.gsub('Controller', '').constantize
    end

    def service_class
      self.class.service_class
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
itsf_backend-4.0.1 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-4.0.0 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-3.1.1 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-3.1.0 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-3.0.7 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-3.0.6 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-3.0.5 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-3.0.4 app/controllers/itsf/backend/service/base_controller.rb