In a rails (2.3) app I have been building, I have an XML builder that outputs neat XML. I need to take a snapshot of this XML and store it in the database (or file) upon a certain user action.
How do I get the output of the xml builder view from in the middle of another action?
This code causes a deadlock in a single threaded application...
uri = URI.parse("http://localhost:3000")
response = Net::HTTP.start(uri.host, uri.port) {|http|
http.head('/xmliwanttoarchive.xml')
}
Not sure how to approach this one.. Cheers.