In my rails 3 app I use fastercsv to create a csv file to screen, works great now… but how do I instead have it open a dialog to save the file to the user’s local system?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Check out this SO answer (the one with 19 upvotes, not the accepted answer): in rails, how to return records as a csv file
The key is sending the file with the
headers['Content-Disposition']