Skip to content

Instantly share code, notes, and snippets.

@kusakusakusa
Last active August 29, 2015 14:20
Show Gist options
  • Save kusakusakusa/b3eab5a9fe60799a1244 to your computer and use it in GitHub Desktop.
Save kusakusakusa/b3eab5a9fe60799a1244 to your computer and use it in GitHub Desktop.
CSV
CSV.open("myfile.csv", "w") do |csv|
csv << BusinessService.column_names
BusinessService.all.each do |m|
csv << m.attributes.values
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment