I noticed that Monban has some password reset functionality. I can’t seem to figure out how to get it working though. I created a passwords_controller
that sets a reset token when the user enters their email. Then they go to /passwords/:token/edit
and fill out a new password to reset it. I just can’t figure out how to write the new password to the user.
It looks like there is no controller helper for password reset. You will have to call the service manually:
Monban::PasswordReset.new(current_user, params[:password]).perform
According to the source you linked, the perform
method encrypts the given password and then updates the given user with the new password.