Class: RegistrationsController
- Inherits:
-
Devise::RegistrationsController
- Object
- Devise::RegistrationsController
- RegistrationsController
- Defined in:
- app/controllers/registrations_controller.rb
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
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]) :notice, :updated # Line below required if using Devise >= 1.2.0 sign_in resource_name, resource, :bypass => true redirect_to after_update_path_for(resource) else clean_up_passwords(resource) render_with_scope :edit end end |