Skip to Content Skip to Search
Methods
U

Instance Public methods

update()

# File app/controllers/v2/passwords_controller.rb, line 3
def update
  if current_member.authenticate(params[:current_password])
    current_member.password = params[:new_password]

    if current_member.save(context: :update_password)
      head :ok
    else
      render_attributes_errors(current_member.errors)
    end
  else
    render_error(".new_password.incorrect_current_password", :unauthorized)
  end
end