Fixed articles module.
This commit is contained in:
parent
f30e57dd49
commit
fc1c173718
14 changed files with 124 additions and 147 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# Module for FoodSoft-File import
|
||||
# The FoodSoft-File is a cvs-file, with semicolon-seperatet columns
|
||||
|
||||
require 'faster_csv'
|
||||
|
||||
require 'csv'
|
||||
|
||||
module FoodsoftFile
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ module FoodsoftFile
|
|||
def self.parse(file)
|
||||
articles, outlisted_articles = Array.new, Array.new
|
||||
row_index = 2
|
||||
FasterCSV.parse(file.read, {:col_sep => ";", :headers => true}) do |row|
|
||||
::CSV.parse(file.read, {:col_sep => ";", :headers => true}) do |row|
|
||||
# check if the line is empty
|
||||
unless row[2] == "" || row[2].nil?
|
||||
article = {:number => row[1],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue