Class: Clearance::PasswordsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Clearance::PasswordsController
- Defined in:
- app/controllers/clearance/passwords_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/controllers/clearance/passwords_controller.rb', line 9 def create if user = find_user_for_create user.forgot_password! deliver_email(user) end render template: 'passwords/create' end |
#edit ⇒ Object
17 18 19 20 |
# File 'app/controllers/clearance/passwords_controller.rb', line 17 def edit @user = find_user_for_edit render template: 'passwords/edit' end |
#new ⇒ Object
22 23 24 |
# File 'app/controllers/clearance/passwords_controller.rb', line 22 def new render template: 'passwords/new' end |
#update ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/controllers/clearance/passwords_controller.rb', line 26 def update @user = find_user_for_update if @user.update_password password_reset_params sign_in @user redirect_to url_after_update else flash_failure_after_update render template: 'passwords/edit' end end |