Class: ActionAuth::Identity::PasswordResetsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ActionAuth::Identity::PasswordResetsController
- Defined in:
- app/controllers/action_auth/identity/password_resets_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/controllers/action_auth/identity/password_resets_controller.rb', line 13 def create if @user = ActionAuth::User.find_by(email: params[:email], verified: true) send_password_reset_email redirect_to sign_in_path, notice: "Check your email for reset instructions" else redirect_to sign_in_path, alert: "You can't reset your password until you verify your email" end end |
#edit ⇒ Object
10 11 |
# File 'app/controllers/action_auth/identity/password_resets_controller.rb', line 10 def edit end |
#new ⇒ Object
7 8 |
# File 'app/controllers/action_auth/identity/password_resets_controller.rb', line 7 def new end |
#update ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/controllers/action_auth/identity/password_resets_controller.rb', line 22 def update if @user.update(user_params) redirect_to sign_in_path, notice: "Your password was reset successfully. Please sign in" else render :edit, status: :unprocessable_entity end end |