Skip to content

Instantly share code, notes, and snippets.

@jasonlyles
Created April 27, 2010 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jasonlyles/381230 to your computer and use it in GitHub Desktop.
Save jasonlyles/381230 to your computer and use it in GitHub Desktop.
def update
params[:server][:network_interfaces].collect!{|x| NetworkInterface.new(x)}
@server = Server.find(params[:id])
respond_to do |format|
if @server.update_attributes(params[:server])
flash[:notice] = 'Server was successfully updated.'
format.html { redirect_to(@server) }
format.xml { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @server.errors, :status => :unprocessable_entity }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment