$ table = CSV.table('recipients.csv')
$ table.count #=> 26504
$ found.count #=> 3
After running quick.rb
I get table.count #=> 0
What am I overlooking?
$ table = CSV.table('recipients.csv')
$ table.count #=> 26504
$ found.count #=> 3
After running quick.rb
I get table.count #=> 0
What am I overlooking?
require 'csv' | |
recipient = CSV.read('short.csv', headers: true) | |
found = User.where(email: recipient['email']).each{ |u| puts u.email } | |
table = CSV.table('recipients.csv') | |
table.delete_if do |t| | |
found.each do |f| | |
f.email == t[:email] | |
end | |
end |