Skip to content

Instantly share code, notes, and snippets.

@samgooi4189
samgooi4189 / InvestigateDeviseParameterSanitizerr
Created July 15, 2017 09:41
Why devise_parameter_sanitizer.sanitize return empty params? [Solved]
Problem:
(byebug) devise_parameter_sanitizer.sanitize(:sign_up)
{}
Investigation:
1. We post the data to the backend in this format
```
$ curl -X POST -H "Content-Type: application/json" --data "{\"user\": {\"email\":\"abc@abc.com\", \"password\": \"1234567890\", \"password_confirmation\": \"1234567890\"}}" localhost:3000/api/v1/users
```