Permalink
Browse files

script to export user emails

  • Loading branch information...
scottsil committed Jun 3, 2012
1 parent fc194af commit 931ceafa7ff566ad1d3bd7211ebdacfdc1ed27d3
Showing with 9 additions and 1 deletion.
  1. +2 −1 .gitignore
  2. +7 −0 user_emails_export_from_db.rb
View
@@ -5,4 +5,5 @@ log/*.log
tmp/
.DS_Store
coverage/
-public/images/bg-main(old).jpg
+public/images/bg-main(old).jpg
+user_emails_12-06-03.csv
@@ -0,0 +1,7 @@
+require 'fastercsv'
+
+FasterCSV.open("file.csv", "w") do |csv|
+ User.all.each do |object|
+ csv << object.email
+ end
+end

0 comments on commit 931ceaf

Please sign in to comment.