I have an app where I allow users to import CSV data.
Everything was working until users started importing data with blank rows in the CSV file. I am using the following to grab the rows out of the CSV file:
CSV.readlines(import_file, headers: true, skip_blanks: true)
I thought that if I added the option to skip_blanks that it would do that but it hasn't. Any ideas on how I can ignore the blank rows.
Thanks!
CSV.new( ( open import_file ), headers: true, skip_blanks: true ).readlines