Sha256: a3d41b2a7d4fd0c1a61c6d846b01a2ee7b9d1b211ca84a9f260f8d5d442e705a

Contents?: true

Size: 386 Bytes

Versions: 12

Compression:

Stored size: 386 Bytes

Contents

# frozen_string_literal: true

module Spree
  module Admin
    module BaseControllerDecorator
      protected

      def model_class
        const_name = controller_name.classify
        if Spree.const_defined?(const_name, false)
          return "Spree::#{const_name}".constantize
        end

        nil
      end

      ::Spree::Admin::BaseController.prepend self
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
solidus_auth_devise-2.5.9 lib/decorators/backend/controllers/spree/admin/base_controller_decorator.rb
solidus_auth_devise-2.5.8 lib/decorators/backend/controllers/spree/admin/base_controller_decorator.rb
solidus_auth_devise-2.5.7 lib/decorators/backend/controllers/spree/admin/base_controller_decorator.rb
solidus_auth_devise-2.5.6 lib/decorators/backend/controllers/spree/admin/base_controller_decorator.rb
solidus_auth_devise-2.5.5 lib/decorators/backend/controllers/spree/admin/base_controller_decorator.rb
solidus_auth_devise-2.5.4 lib/decorators/backend/controllers/spree/admin/base_controller_decorator.rb
solidus_auth_devise-2.5.3 lib/decorators/backend/controllers/spree/admin/base_controller_decorator.rb
solidus_auth_devise-2.5.2 lib/decorators/backend/controllers/spree/admin/base_controller_decorator.rb
solidus_auth_devise-2.5.1 lib/decorators/backend/controllers/spree/admin/base_controller_decorator.rb
solidus_auth_devise-2.5.0 lib/decorators/backend/controllers/spree/admin/base_controller_decorator.rb
solidus_auth_devise-2.4.0 lib/controllers/backend/spree/admin/base_controller_decorator.rb
solidus_auth_devise-2.3.0 lib/controllers/backend/spree/admin/base_controller_decorator.rb