Exporting as csv in rails

UPDATE: I made some code changes that seemed to work better for my needs. Plus, it places everything in the respond_to .csv block. Check the pastie

Recipe 35 of rails recipes does not seem to work any longer on rails 2.0. I believe you have to now strictly use FasterCSV - which is supposed to be much better anyhow.

fastercsv docs

fastercsv project page

Here is a great tutorial on how to get it working

to install fastercsv, you must install the gem. Do the command: sudo gem install fastercsv

Comments