I am using Mailer and MailCatcher.
When an admin registered the customer in the system, the customer should receive an email with a link to restore his password
I am using Mailer and MailCatcher.
When an admin registered the customer in the system, the customer should receive an email with a link to restore his password
Copyright © 2021 Jogjafile Inc.
You're reinventing the wheel. Devise already has an Invitable module that does what you are looking for.
After following the installation instructions you just add a link to
new_user_invitation_pathwhere admins can invite other users. If you want to lock down the invitiations so that only admins can invite users just customize the controller:If you really want to reinvent the wheel do it right. Devise does not do password resets in
Devise::RegistrationsController- neither should you.Password resets are done in
Devise::PasswordsController:The link in the password reset email is
/users/password/edit. Which you can see in the email view.