Created
January 12, 2021 14:27
-
-
Save mrhead/34b88855e91a8c24a5f4fb4083f7edd7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://3.basecamp.com/3293071/buckets/5610905/todos/3353537510 | |
site = Site.find(23219) # futureofgood | |
csv = CSV.generate force_quotes: true do |csv| | |
csv << ["Name", "Email", "Signup Date", "Initial Article", "Signup Article"] | |
site.members.where("created_at >= ?", "2020-11-01").find_each do |member| | |
csv << [ | |
member.full_name, | |
member.email, | |
member.created_at.to_date, | |
member.tracking_params["initialArticle"], | |
member.tracking_params["signupArticle"] | |
] | |
end | |
end | |
HerokuExport.from_string(csv.to_s, filename: "members.csv") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment