Hi there, This seems like it should be straight-forward, but I'm stumped. I have a link to a view controller that ends up using send_data to download a file to the user's hard drive. This works very well, and it leaves the current view apparently untouched.
But now I would like the page to provide some feedback after that download is complete. I naively put something like the following code in the controller before the send_data method call:
flash[:notice] = "Nice work, hot shot!"
send_data file, :filename=>fullname+".txt", :type=>"text/plain"
But that doesn't work, because the current view doesn't reload to give me a chance to display the flash var.
I've also tried adding an RJS view for this action, but that resulted in the old DoubleRender error, because send_data is a render action as well.
So... uh... how the heck would one pass data back to the current view after running send_data? Or is there another approach to this problem?
Thanks! Aaron.