Class: Devise::PasswordsWithPolicyController
Instance Method Summary
collapse
#old_require_no_authentication
Instance Method Details
#edit ⇒ Object
5
6
7
8
9
10
11
|
# File 'app/controllers/devise/passwords_with_policy_controller.rb', line 5
def edit
self.resource = resource_class.new
if warden.session(scope_name)['secure_password_expired']
resource.errors.add(:base, "#{error_string_for_password_expired}.")
end
render :edit
end
|
#update ⇒ Object
13
14
15
16
17
18
19
20
21
|
# File 'app/controllers/devise/passwords_with_policy_controller.rb', line 13
def update
if resource.update_with_password(password_params)
prepare_for_redirect
redirect_to stored_location_for(scope_name) || :root
else
clean_up_passwords(resource)
render :edit
end
end
|