Sha256: 6c34fc3d97d518ff722c348e64e058f9c5fd3bad99feaf6c3fe9e54203fe28a1

Contents?: true

Size: 237 Bytes

Versions: 21

Compression:

Stored size: 237 Bytes

Contents

Spree::Admin::BaseController.class_eval do
  protected

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

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
solidus_auth_devise-2.2.0 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise_devise_token_auth-2.1.0.5 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise_devise_token_auth-2.1.0.4 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise_devise_token_auth-2.1.0.3 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise_devise_token_auth-2.1.0.2 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise_devise_token_auth-2.1.0.1 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise_devise_token_auth-2.1.0 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-2.1.0 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-2.0.0 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-1.6.4 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-1.6.3 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-1.6.2 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-1.6.1 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-1.6.0 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-1.5.0 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-1.4.0 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-1.3.0 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-1.2.3 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-1.2.2 lib/controllers/backend/spree/admin/admin_controller_decorator.rb
solidus_auth_devise-1.2.1 lib/controllers/backend/spree/admin/admin_controller_decorator.rb