Class: ReviseAuth::PasswordResetsController
- Inherits:
-
ReviseAuthController
- Object
- ApplicationController
- ReviseAuthController
- ReviseAuth::PasswordResetsController
- Defined in:
- app/controllers/revise_auth/password_resets_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/controllers/revise_auth/password_resets_controller.rb', line 8 def create user = User.find_by(email: user_params[:email]) user&.send_password_reset_instructions flash[:notice] = t(".password_reset_sent") redirect_to login_path end |
#edit ⇒ Object
16 17 |
# File 'app/controllers/revise_auth/password_resets_controller.rb', line 16 def edit end |
#new ⇒ Object
4 5 6 |
# File 'app/controllers/revise_auth/password_resets_controller.rb', line 4 def new @user = User.new end |
#update ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'app/controllers/revise_auth/password_resets_controller.rb', line 19 def update if @user.update(password_params) flash[:notice] = t("revise_auth.password.update.password_changed") redirect_to login_path else render :edit, status: :unprocessable_entity end end |