Topic: Best way to offer downloads to user?
I'd like to be able to generate excel and word documents on the fly, using remote (asynchronous) links if possible. So, if I'm going to generate a .xls file (dependent on the current view and certain session options) and offer it to the user as a direct download, whats the best way to do this?
I'm using Spreadsheet::Excel for xls. One solution I thought of was to generate the file and store it server-side, then offer a direct download of that file on the server. Is this necessary, or can I generate the .xls file and push it to the client in one fell swoop?
Also, if I'm going to need to store the file server side and then offer a link to it, how can I code this into my controller? Would I end the method with "redirect_to <url of file>"?