Skip to content

Instantly share code, notes, and snippets.

@ruprict
Created April 4, 2014 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruprict/9979987 to your computer and use it in GitHub Desktop.
Save ruprict/9979987 to your computer and use it in GitHub Desktop.
def report_bad_accounts
no_bad = 0
CSV.foreach('play_accounts.csv', headers: true) do |row|
acc = Account.where(email: row['email']).first
puts "Account not found for #{row['email']}" && next unless acc
unless acc.kyck_id.to_s == row['kyck_id']
no_bad += 1
puts "KYCK IDs don't match for #{row['email']}"
puts "Auth KYCK ID=#{acc.kyck_id.to_s} / Play KYCK ID=#{row['kyck_id']}"
end
end
puts "Number of bad accounts: #{no_bad}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment