Class: PasswordResetsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- PasswordResetsController
- Defined in:
- app/controllers/password_resets_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Send a password update link to users with a verified email.
-
#new ⇒ Object
Form for user to request a password reset.
Instance Method Details
#create ⇒ Object
Send a password update link to users with a verified email
14 15 16 17 18 19 20 21 |
# File 'app/controllers/password_resets_controller.rb', line 14 def create if user user.regenerate_verification_token MinimalistAuthenticationMailer.with(user:).update_password.deliver_now end # always display notice even if the user was not found to prevent leaking user emails redirect_to new_session_path, notice: "Password reset instructions were mailed to #{email}" end |
#new ⇒ Object
Form for user to request a password reset
9 10 11 |
# File 'app/controllers/password_resets_controller.rb', line 9 def new @user = MinimalistAuthentication.configuration.user_model.new end |