Sha256: fc31f8b94982550a37c37b894b849fccaada93a5d556535772f57bb02ed22c45

Contents?: true

Size: 790 Bytes

Versions: 9

Compression:

Stored size: 790 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 
    end

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

    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

9 entries across 9 versions & 1 rubygems

Version Path
itsf_backend-1.1.7 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.6 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.5 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.4 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.3 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.2 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.1 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.0 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.0.1 app/controllers/itsf/backend/service/base_controller.rb