Sha256: 37bcde5f07162d59021e177dfa9c5fcbef01b7e9c9c4422ca2a3800875b76719

Contents?: true

Size: 659 Bytes

Versions: 8

Compression:

Stored size: 659 Bytes

Contents

module Overrides
  class RegistrationsController < DeviseTokenAuth::RegistrationsController
    OVERRIDE_PROOF = "(^^,)"

    def update
      if @resource
        if @resource.update_attributes(account_update_params)
          render json: {
            status: 'success',
            data:   @resource.as_json,
            override_proof: OVERRIDE_PROOF
          }
        else
          render json: {
            status: 'error',
            errors: @resource.errors
          }, status: 422
        end
      else
        render json: {
          status: 'error',
          errors: ["User not found."]
        }, status: 404
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
devise_token_auth-0.1.43 test/dummy/app/controllers/overrides/registrations_controller.rb
digix_devise_token_auth-0.1.44 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.43.beta1 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.42 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.41 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.40 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.39 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.38 test/dummy/app/controllers/overrides/registrations_controller.rb