Method: UsersController#update

Defined in:
app/controllers/users_controller.rb

#updateObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'app/controllers/users_controller.rb', line 25

def update
  if @user.update_attributes(params[:user])
    if params[:user][:password].present?
      # this logic needed b/c devise wants to log us out after password changes
      user = User.reset_password_by_token(params[:user])
      (@user, :event => :authentication)
    end
    flash.notice = I18n.t("account_updated")
    redirect_to 
  else
    render 'edit'
  end

end