You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When posting an empty body to the Registration controller, a 500 error is returned:
NoMethodError in DeviseTokenAuth::RegistrationsController#create
undefined method `downcase' for nil:NilClass
Extracted source (around line #12):
# honor devise configuration for case_insensitive_keys
if resource_class.case_insensitive_keys.include?(:email)
-> @resource.email = sign_up_params[:email].downcase
else
@resource.email = sign_up_params[:email]
end
I'm currently working on an API which uses DTA so I have no way of ensuring that the client will send proper sign up data in POST body. I can do a PR for this but I'd like to make sure I'm going the right way about it:
Adding before_filter on registrations_controller (validate_sign_up_body perhaps? only for post)
validate_sign_up_body returns 422 unprocessable entity + json errors: 'Please post proper sign up data in request body.' if sign_up_params is empty.
Does that sound good?
Cheers.
The text was updated successfully, but these errors were encountered:
Hello,
When posting an empty body to the Registration controller, a 500 error is returned:
I'm currently working on an API which uses DTA so I have no way of ensuring that the client will send proper sign up data in POST body. I can do a PR for this but I'd like to make sure I'm going the right way about it:
Does that sound good?
Cheers.
The text was updated successfully, but these errors were encountered: