Hi. all
I am working on a website on devise.
I am not able to add additional parameter in sign_up.
I have already added to account_update , but with sign_up it is not working.
my codes are:-
def configure_devise_permitted_parameters
if params[:action] == 'update'
devise_parameter_sanitizer.for(:account_update) do |user_params|
user_params.permit(:current_password , :first_name, :middle_name, :last_name, :phone_number, :gender, :aadhar_number, :date_of_birth, :occupation, )
end
elsif params[:action] == 'create'
devise_parameter_sanitizer.for(:sign_up) do |user_params|
user_params.permit(:email, :password, :password_confirmation, :category_id, :first_name, :last_name, :phone_number, :gender, :aadhar_no, :date_of_birth)
end