Sha256: ae850eaabb15564e6df634d2f62932262ceff84439392b13555132a3f7c92fad

Contents?: true

Size: 698 Bytes

Versions: 26

Compression:

Stored size: 698 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]
          end
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
spree_api-4.10.1 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.10.0 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.9.0 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.8.3 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.8.2 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.7.3 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.6.6 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.5.5 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.4.1 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.5.4 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.6.5 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.7.2 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.7.1 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.6.4 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.7.0 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.6.3 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.6.2 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.6.1 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.6.0 app/controllers/spree/api/v2/platform/users_controller.rb
spree_api-4.5.3 app/controllers/spree/api/v2/platform/users_controller.rb