My CSV is like:
username, lastname, firstname, age, weight, location
If I don’t have a value, I need to have just the comma with no data like:
blankman, man, blank,,,usa
Right now I have:
blankman, man, blank, '','',usa
Because I am doing this like:
users = User.....
users.each { |user|
age = ''
csv << [ ... ,age, ... ]
}
If I left the variable age uninitialized, then I got an error.
not sure what to do?
Try using
age = nil.