I am responding to a POST from a server that I don't control, and all the params[] come in as Tempfiles - which I can work around. (I am running on thin here at my desktop mac).
The whole method works, but at the last line I have: render :nothing => true
As there is nothing to render. It is in this render :nothing => true call that rails seems to assume that some param is a string, and it throws an exception.
When I need a param I have found it necc to call
def self.convert_to_string(tempfile_or_string)
if (tempfile_or_string.class.to_s=='Tempfile')
return tempfile_or_string.read
end
tempfile_or_string.to_s
end
But I can't call this (or can I?) in render :nothing => true
What I also don't get is that it seems to be in the servers control wether or not the params come in as tempfiles or plain strings.
Thanks for any insight
--Tom