Rails handles most of this finished product.
reply_to
@list XML:
@list = Model.find(:all)
respond_to do |format|
format.html { render :action => "index" }
format.xml { render :xml => @list }
end
http ( , ):
format.xml { head :ok }
, Active Record :
format.xml { render :xml => @model.errors, :status => :unprocessable_entity }