From f6eec580a0e52e07a6bdc76d79f2aff21f57c266 Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Tue, 3 Apr 2012 19:57:19 -0700 Subject: [PATCH] collect invite tokens here, because why not --- lib/tasks/migrations.rake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/tasks/migrations.rake b/lib/tasks/migrations.rake index 7a1fbf298..378a4c0bb 100644 --- a/lib/tasks/migrations.rake +++ b/lib/tasks/migrations.rake @@ -10,11 +10,13 @@ namespace :migrations do ShareVisibilityConverter.copy_hidden_share_visibilities_to_users end + desc 'puts out information about old invited users' task :invitations => [:environment] do - User.where('username is NULL AND length(email) > 0').select([:id, :email]).find_in_batches do |users| - users.each{|x| puts x.email } - puts "BATCH" + puts "email, invitation_token" + User.where('username is NULL AND length(email) > 0').select([:id, :email, :invitation_token]).find_in_batches do |users| + users.each{|x| puts "#{x.email}, #{x.invitation_token}" } end + puts "done" end desc 'absolutify all existing image references'