M
Milo Thurston
I'd like to have a cgi script produce it's output
as a downloadable .csv file rather than displaying it on screen.
In perl, I used to do it this way:
@stuff = qw(some items in an array);
print $cgi->header(-TYPE => 'text/plain',
-EXPIRES => 'now',
-ATTACHMENT => 'download.csv');
foreach (@stuff) { print "$_\cI"; }
exit 0;
Any suggestions on doing the same with ruby? A direct translation
of the code doesn't seem to be very effective - I get only a blank
page.
Thanks for any suggestions.
as a downloadable .csv file rather than displaying it on screen.
In perl, I used to do it this way:
@stuff = qw(some items in an array);
print $cgi->header(-TYPE => 'text/plain',
-EXPIRES => 'now',
-ATTACHMENT => 'download.csv');
foreach (@stuff) { print "$_\cI"; }
exit 0;
Any suggestions on doing the same with ruby? A direct translation
of the code doesn't seem to be very effective - I get only a blank
page.
Thanks for any suggestions.