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
Renders 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 22 23 24 |
# File 'app/controllers/password_resets_controller.rb', line 14 def create if email_valid? send_update_password_email if user # Always display notice to prevent leaking user emails redirect_to new_session_path, notice: t(".notice", email:) else flash.now.alert = t(".alert") render :new, status: :unprocessable_entity end end |
#new ⇒ Object
Renders form for user to request a password reset
9 10 11 |
# File 'app/controllers/password_resets_controller.rb', line 9 def new # new.html.erb end |