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
Password reset request form.
Instance Method Details
#create ⇒ Object
Send a password update link to users with a verified email
17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/password_resets_controller.rb', line 17 def create if email_valid? send_update_password_email(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_content end end |
#new ⇒ Object
Password reset request form
12 13 14 |
# File 'app/controllers/password_resets_controller.rb', line 12 def new # new.html.erb end |