Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # PUT /users/1
- # PUT /users/1.xml
- def update
- @user = User.find(params[:id])
- respond_to do |format|
- if @user.update_attributes(params[:user])
- format.html { redirect_to(users_url, :notice => "User #{@user.name} was successfully updated.") }
- format.xml { head :ok }
- else
- format.html { render :action => "edit" }
- format.xml { render :xml => @user.errors,
- :status => :unprocessable_entity }
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement