Problem with send_data and csv file produced


hi, i did a search and couldn’t find wat’s the problem with my code…
it seems everything is the same and the result is what i expected but i
am not sure where went wrong…

using send_data function to send the csv file to the client, the file
sending is successfully but when i opened the csv file, something is

every statement got a “…” inverted commas!!! omg!!! how to get
rid of them!! the data is correct just the why come there is the
inverted commas!! any pro in RoR pls!! help me!!

here is a snippet of the code …

report =
array_csv =
CSV::Writer.generate(report, ‘,’) do |csv|
@csv_record.each do |record|
record.attributes.each { |key,value| array_csv.push “#{value}”}
csv << [array_csv.join(’,’)]
:type => ‘text/csv; charset=iso-8859-1;header = present’,
:filename => ‘report.csv’)

this is quite standard as i compared with the others… i didnt include
the dispostion option as it is default to :attachment… is there
anything wrong with it???