Unpermitted parameters not allowing sign up (name, terms_of_service and time_zone
Hi
I'm at a loss to know why Devise isn't accepting the parameters
The error I'm getting when I'm trying to create an account is:
I'm at a loss to know why Devise isn't accepting the parameters
name
, terms of service
and time zone
.The error I'm getting when I'm trying to create an account is:
Started POST "/users" for ::1 at 2021-01-30 18:28:29 +1100Processing by Users::RegistrationsController#create as TURBO_STREAMParameters: {"authenticity_token"=>"XXX", "user"=>{"name"=>"[FILTERED]", "email"=>"[FILTERED]", "password"=>"[FILTERED]", "time_zone"=>"Melbourne", "terms_of_service"=>"1"}, "g-recaptcha-response"=>" ", "tezcirmnf-v"=>""}Unpermitted parameters: :name, :time_zone, :terms_of_service
Here is my
application controller
:def configure_permitted_parameters extra_keys = [:avatar, :preferred_language] signup_keys = extra_keys + [:invite, :name, :time_zone, :terms_of_service, owned_accounts_attributes: [:name]] devise_parameter_sanitizer.permit(:sign_up, keys: signup_keys) devise_parameter_sanitizer.permit(:account_update, keys: extra_keys) devise_parameter_sanitizer.permit(:accept_invitation, keys: extra_keys) end
Does it have something to do with the params being part of the users attribute?
I'm also getting validation errors when I've ticked the Terms of Service and provided a name.
I haven't changed anything from the devise sign up form ... I think it's the default JSP one.
Thanks for any help in getting this working.
Darren
Notifications
You’re not receiving notifications from this thread.