Sha256: c094f75cecde673245a924848b91498ece81f7e8707fc9f2af8a0f22bb63ce63

Contents?: true

Size: 659 Bytes

Versions: 36

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: 403
        end
      else
        render json: {
          status: 'error',
          errors: ["User not found."]
        }, status: 404
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
devise_token_auth-0.1.37 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.37.beta4 test/dummy/app/controllers/overrides/registrations_controller.rb
cm-devise_token_auth-0.1.30.1 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.37.beta3 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.37.beta2 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.37.beta1 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.36 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.35 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.34 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.33 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.32 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.32.beta10 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.32.beta9 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.32.beta8 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.32.beta7 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.32.beta6 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.32.beta5 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.32.beta4 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.32.beta3 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_token_auth-0.1.32.beta2 test/dummy/app/controllers/overrides/registrations_controller.rb