0

在我的 rails 3 应用程序中,我使用 fastercsv 创建一个用于筛选的 csv 文件,现在效果很好......但是我如何让它打开一个对话框以将文件保存到用户的本地系统?

4

1 回答 1

1

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']

于 2011-03-30T01:17:00.223 回答