Skip to content

Instantly share code, notes, and snippets.

@codenamev
Created March 14, 2012 14:56
Show Gist options
  • Save codenamev/2037027 to your computer and use it in GitHub Desktop.
Save codenamev/2037027 to your computer and use it in GitHub Desktop.
FasterCSV export row with commas escaped
# One row
["Quid, quid", "latinum dictum"].to_csv
#Multiple Rows
FasterCSV.generate(:col_sep=>',', :quote_char => '"') do |row|
row << ["Quid, quid", "latinum dictum"]
row << ["sit, altum", "viditur."]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment