Adding more fields to the user table with Gem Devise

Asked

Viewed 490 times

2

I wonder if there is possibility to add more fields to the user table generated by Devise because I need to relate it to others, and add more information. Is there a problem in doing so?

2 answers

2

There is no problem, it is a table like any other.

Create a Migration and add fields.

0

I decided to add these lines to the Aplication controller

before_action :configure_permitted_parameters, if: :devise_controller?

protected

def configure_permitted_parameters
    devise_parameter_sanitizer.permit(:sign_up, keys: [:nome])
    devise_parameter_sanitizer.permit(:sign_up, keys: [:ativo])
end

Browser other questions tagged

You are not signed in. Login or sign up in order to post.