Skip to content

Instantly share code, notes, and snippets.

@csexton
Forked from jasonlyles/gist:381230
Created April 27, 2010 20:05
Show Gist options
  • Save csexton/381243 to your computer and use it in GitHub Desktop.
Save csexton/381243 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