My code:
Zip::Archive.open(file.path) do |archive|
archive.each do |inner_file|
file_name = inner_file.name.split('.')[0]
CSV.parse(inner_file.read, headers: :first_line) do |row|
-----
some_code
-----
end
end
end
But I'd like to use CSV.foreach for that file content, but cannot get it working.. any suggestion?