I am trying to configure my ruby on rails application in such a manner that I can update values with http Patch calls from for example a Angular app. Currently I have the following method of which I expect it to work:

**users\_controller.rb**

```
  def safe_params
    params.require(:id).permit(:email)
  end

  def update
    user = User.find(params[:id])
    user.update_attributes(safe_params)
    render nothing: true, status: 204
  end

```

However, I get the following error when I pass some simple JSON:

> 
> undefined method `permit' for "500":String
> 
> 
> 

Passed JSON:

```
{"email":"newadres@live.com", "id":500}

```

Do you guys know what I am doing wrong?