Sha256: 215e9875366937e49842258ef30072e667b96216fd99df282a42a87d29aaf11b

Contents?: true

Size: 834 Bytes

Versions: 9

Compression:

Stored size: 834 Bytes

Contents

module Itsf::Backend
  class HomeController < Configuration.home_base_controller.constantize
    helper Itsf::Backend::ApplicationHelper
    helper Itsf::Backend::BootstrapHelper
    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

9 entries across 9 versions & 1 rubygems

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