What is the best way to handle the need to a user to download 2 files. I'm using *send_data* to send the file to the browser. How can I allow the user to get two dynamically generated files from one request, OR what is a better alternative to do this. A simple example of what I'm trying to do is:
def data_out
output = "foo foo foo "
send_data(output,:type => "text/csv",:filename => "foo.txt")
output2 = "bar bar bar"
send_data(output2,:type => "text/csv",:filename => "bar.txt" )
end
When calling data_out, only bar.txt file is sent to the browser.