Search code examples
ruby-on-railsdeviserubygems

devise: user model not updating after permiting additional parameters


I have created a model User with devise. It contains extra fields firstname and lastname. I have permitted these parameters in the application controller:

 def configure_permitted_parameters
        devise_parameter_sanitizer.permit(:sign_up, keys: [:firstname, :lastname, :email, :password])
        devise_parameter_sanitizer.permit(:account_update, keys: [:firstname, :lastname, :email, :password, :password_confirmation, :current_password])
        
    end

But when I click on update, nothing is updated. In terminal it shows OK.


Solution

  • There was no issue with the code, we need to enter the current password in order to update the information.