Currently I am using this:
if @part.save
format.xml {render :xml => @part, :status => :created, :location => @part }
else
format.xml {render :xml => @part.errors, :status => :unprocessable_entity }< br />end
I need a custom response, i.e. xml with
How can I do this?
Thank you!
Something like this:
< pre>render :xml => {:result => “OK”}.to_xml
This renders
OK < /pre>
Currently I am using this:
if @part.save
format.xml { render :xml => @part, :status => :created, :location => @part }
else
format.xml {render :xml => @part.errors, :status =>: unprocessable_entity }
end
I need a custom response, i.e. xml with
How can I do this?
Thank you!
Something like this:
render :xml => {:result => "OK"}.to_xml
This is present
OK
p>