Class: Clearance::PasswordsController
Instance Method Summary
collapse
#show
#authorize, #deny_access
#authenticate, #current_user, #current_user=, #handle_unverified_request, #sign_in, #sign_out, #signed_in?, #signed_out?
Instance Method Details
#create ⇒ Object
8
9
10
11
12
13
14
|
# File 'app/controllers/clearance/passwords_controller.rb', line 8
def create
if user = find_user_for_create
user.forgot_password!
deliver_email(user)
end
render template: 'passwords/create'
end
|
#edit ⇒ Object
16
17
18
19
|
# File 'app/controllers/clearance/passwords_controller.rb', line 16
def edit
@user = find_user_for_edit
render template: 'passwords/edit'
end
|
#new ⇒ Object
21
22
23
|
# File 'app/controllers/clearance/passwords_controller.rb', line 21
def new
render template: 'passwords/new'
end
|
#update ⇒ Object
25
26
27
28
29
30
31
32
33
34
35
|
# File 'app/controllers/clearance/passwords_controller.rb', line 25
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
|