Sha256: 1674b60c10710c96b975f9393a46fe69b65adaddf7e1eed03ff4a3a1403375aa

Contents?: true

Size: 858 Bytes

Versions: 20

Compression:

Stored size: 858 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
    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

20 entries across 20 versions & 1 rubygems

Version Path
itsf_backend-2.2.1 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-2.2.0 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-2.1.0 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-2.0.2 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-2.0.1 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.2.8 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.2.7 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.2.6 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.2.5 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.2.4 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.2.1 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.2.0 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.15 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.14 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.13 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.12 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.11 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.10 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.9 app/controllers/itsf/backend/service/base_controller.rb
itsf_backend-1.1.8 app/controllers/itsf/backend/service/base_controller.rb