Sha256: 8526b400504a6bd122a0023acbb3b0957805fae1c66d412f6bd07c4bc3d4f61e

Contents?: true

Size: 732 Bytes

Versions: 3

Compression:

Stored size: 732 Bytes

Contents

module Spree
  module Api
    module V2
      module Platform
        class UsersController < ResourceController
          private

          def model_class
            Spree.user_class
          end

          def resource_serializer
            Spree::Api::V2::Platform::UserSerializer
          end

          def scope_includes
            [:ship_address, :bill_address]
          end

          # we need to define this here as developers can configure their own `user_class`
          def model_param_name
            'user'
          end

          def spree_permitted_attributes
            super + [:password, :password_confirmation, spree_role_ids:[], vendor_ids:[]]
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
atkhayar-dev-spree-api-0.0.1 app/controllers/spree/api/v2/platform/users_controller.rb
atkhayar-dev-spree-api-0.0.0 app/controllers/spree/api/v2/platform/users_controller.rb
atkhayar-spree-dev-api-0.0.0 app/controllers/spree/api/v2/platform/users_controller.rb