app/controllers/users_controller.rb
#updates users via update_attributes based on what is defined in user_params
#renders a view to edit users
updates users via update_attributes based on what is defined in user_params
renders a view to edit users
updates users via update_attributes based on what is defined in user_params renders a view to edit users
def update
    @user = User.find(params[:id])
    if @user.update_attributes(user_params)
      flash[:success] = "Profile updated!"
      redirect_to @user
    else
      render 'edit'
    end
  end
def update @user = User . find ( params [ :id ] ) if @user . update_attributes ( user_params ) flash [ :success ] = "Profile updated!" redirect_to @user else render 'edit' end end
updates users via update_attributes based on what is defined in user_params
renders a view to edit users
updates users via update_attributes based on what is defined in user_params renders a view to edit users