Class: My::RecoveriesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- My::RecoveriesController
- Includes:
- Authentication
- Defined in:
- app/controllers/my/recoveries_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
post /my/recovery.
-
#show ⇒ Object
get /my/recovery.
-
#update ⇒ Object
patch /my/recovery.
Methods included from Authentication
#create_token_for_user, #deactivate_token, #pop_token, #redirect_authenticated_user
Instance Method Details
#create ⇒ Object
post /my/recovery
12 13 14 15 16 17 18 19 |
# File 'app/controllers/my/recoveries_controller.rb', line 12 def create if @user.nil? || @user.email.blank? redirect_to my_recovery_path, alert: t('my.recoveries.create.impossible') else send_code redirect_to my_recovery_path, notice: t('my.recoveries.create.completed') end end |
#show ⇒ Object
get /my/recovery
8 9 |
# File 'app/controllers/my/recoveries_controller.rb', line 8 def show end |
#update ⇒ Object
patch /my/recovery
22 23 24 25 26 27 28 29 |
# File 'app/controllers/my/recoveries_controller.rb', line 22 def update set_manager if @manager.code_is_valid? reset_password else redirect_to my_recovery_path, alert: t('my.recoveries.update.invalid_code') end end |