Class: Devise::PasswordsWithPolicyController

Inherits:
RegistrationsController
  • Object
show all
Defined in:
app/controllers/devise/passwords_with_policy_controller.rb

Instance Method Summary collapse

Instance Method Details

#devise_parameter_sanitizerObject



20
21
22
# File 'app/controllers/devise/passwords_with_policy_controller.rb', line 20

def devise_parameter_sanitizer
  @devise_parameter_sanitizer ||= Devise::ParameterSanitizer.new(resource_class, resource_name, params)
end

#editObject



5
6
7
8
9
# File 'app/controllers/devise/passwords_with_policy_controller.rb', line 5

def edit
  self.resource = resource_class.new
  resource.errors.add(:base, "#{error_string_for_password_expired}.")
  render :edit
end

#updateObject



11
12
13
14
15
16
17
18
# File 'app/controllers/devise/passwords_with_policy_controller.rb', line 11

def update
  if update_resource(resource, )
    prepare_for_redirect
    redirect_to stored_location_for(scope_name) || :root
  else
    render :edit
  end
end