Class: ActiveAuthentication::PasswordsController
- Inherits:
-
ActiveAuthenticationController
- Object
- ApplicationController
- ActiveAuthenticationController
- ActiveAuthentication::PasswordsController
- Defined in:
- app/controllers/active_authentication/passwords_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
8 9 10 11 12 |
# File 'app/controllers/active_authentication/passwords_controller.rb', line 8 def create @user = User.find_by email: params[:email] @user&.send_password_reset_instructions redirect_to root_url, notice: t(".success") end |
#edit ⇒ Object
14 15 |
# File 'app/controllers/active_authentication/passwords_controller.rb', line 14 def edit end |
#new ⇒ Object
5 6 |
# File 'app/controllers/active_authentication/passwords_controller.rb', line 5 def new end |
#update ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'app/controllers/active_authentication/passwords_controller.rb', line 17 def update if @user.update(user_params) sign_in @user redirect_to root_url, notice: t(".success") else render :edit, status: :unprocessable_entity end end |