Questions about rails device

Asked 2 years ago, Updated 2 years ago, 105 views

I'm creating a web app with rails.

Deployment of device → Add unique column → Change information by user (like My Page) → Log in with user name, etc. I was working as a beginner...

I was checking from the beginning to see if it actually works, and there is no problem with users who have already created it, but when I try to register for a new one,
Email can't be blank
The error returns.Of course, I didn't try to register empty.

As I worked on various things, I couldn't understand what was affecting me.
Please help me!

user model

controller

ruby-on-rails ruby devise

2022-09-30 19:02

1 Answers

It is only allowed when sign_in, so I think it will be fixed if you allow it when sign_up.

def configure_permitted_parameters
  # ...
  device_parameter_sanitizer.permit(:sign_up, keys:[:username,:name,:email])
end

When you ask questions, please use text instead of images.
When the respondents make corrections, they do it by hand, and the searchability will decrease.


2022-09-30 19:02

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.