Params
Firstly, your strong params
are incorrect:
def permitted_params
params.permit(deal: [:name])
end
As mentioned in this blog post, and this github post, you'll get errors unless use the above code!
Saving
As mentioned in the comments, it seems your save process is by-passing your inherited resources controller
It seems you're using an API, so perhaps that it sending straight to the model; either way, you'll have to detail how you're saving the inbound data