As stated in this documentation I can change the standard col_sep e.g. from "," to ";".
How can I alter this to use both "," and ";" as a col_sep.
My actual code:
def process!
@imported_count = 0
CSV.foreach(file.path, headers: true, header_converters: :symbol, col_sep: ",") do |row|
order = Order.assign_from_row(row)
if order.save
@imported_count += 1
else
errors.add :base, "Line #{$.} - #{order.errors.full_messages.join(",")}"
end
end
end
Thanks in Advance!