Sha256: be0e5f44cb06af38ce5309d6e854ab8fa288605cd5882c381fe9bb0caaba3ab7

Contents?: true

Size: 792 Bytes

Versions: 21

Compression:

Stored size: 792 Bytes

Contents

module Itsf::Backend
  class HomeController < Configuration.home_base_controller.constantize
    helper Itsf::Backend::ApplicationHelper
    helper MultiClientHelper if Itsf::Backend.features?(:multi_client)

    def index
    end

    if Itsf::Backend.features?(:pundit)
      include Pundit
      prepend Controller::PunditNamespacedAuthorizeConcern
      include Controller::PunditAuthorizationFailureHandlingConcern
      helper_method :engine_policy

      after_action :verify_authorized

      def index
        authorize :engine, :access?, self.class.name.deconstantize
      end
    end

    layout 'itsf/backend/base'

    helper_method :engine

    def self.engine
      "#{name.deconstantize}::Engine".constantize
    end

    def engine
      self.class.engine
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
itsf_backend-3.0.2 app/controllers/itsf/backend/home_controller.rb
itsf_backend-3.0.1 app/controllers/itsf/backend/home_controller.rb
itsf_backend-3.0.0 app/controllers/itsf/backend/home_controller.rb
itsf_backend-2.2.1 app/controllers/itsf/backend/home_controller.rb
itsf_backend-2.2.0 app/controllers/itsf/backend/home_controller.rb
itsf_backend-2.1.0 app/controllers/itsf/backend/home_controller.rb
itsf_backend-2.0.2 app/controllers/itsf/backend/home_controller.rb
itsf_backend-2.0.1 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.2.8 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.2.7 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.2.6 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.2.5 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.2.4 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.2.1 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.2.0 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.1.15 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.1.14 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.1.13 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.1.12 app/controllers/itsf/backend/home_controller.rb
itsf_backend-1.1.11 app/controllers/itsf/backend/home_controller.rb