Class: RegistrationsController

Inherits:
Devise::RegistrationsController
  • Object
show all
Defined in:
app/controllers/registrations_controller.rb

Instance Method Summary collapse

Instance Method Details

#updateObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/registrations_controller.rb', line 2

def update
  self.resource = resource_class.to_adapter.get!(send(:"current_#{resource_name}").to_key)

  # Devise use update_with_password instead of update_attributes.
  # This is the only change we make.
  if resource.update_profile(params[resource_name])
    set_flash_message :notice, :updated
    # Line below required if using Devise >= 1.2.0
     resource_name, resource, :bypass => true
    redirect_to after_update_path_for(resource)
  else
    clean_up_passwords(resource)
    render_with_scope :edit
  end
end