## users controller -- courtesy of @cnaths #Something along these lines? def update #grab all users from the database @users = User.find(:all) #parse the params array; loop through each user returning the id params["user"].keys.each do |id| #find the appropriate user record @user = User.find(id.to_i) #set the values as needed @user.guest = params["user"][id]["guest"] @user.active = params["user"][id]["active"] @user.inactive = params["user"][id]["inactive"] #save without validating, or add the appropriate invalidation handling @user.save(perform_validation = false) end respond_to do |format| flash[:notice] = 'Users Updated' format.html do render :update do |page| #reload the page or the changes won't appear page.reload end end format.xml { head :ok } end end