Commit 4299f1aa by Tô Ngọc Ánh

add strip to company in csv

parent 831d463f
Pipeline #833 failed with stages
in 0 seconds
...@@ -13,7 +13,7 @@ class CsvImport ...@@ -13,7 +13,7 @@ class CsvImport
next if row['category'].blank? || row['category'].match(/^[0-9]+$/).present? next if row['category'].blank? || row['category'].match(/^[0-9]+$/).present?
title = row['name'].strip title = row['name'].strip
company = Company.find_or_create_by(name: row['company name']) do |c| company = Company.find_or_create_by(name: row['company name'].strip) do |c|
c.description = "Contact email: #{row['contact email']}\n"\ c.description = "Contact email: #{row['contact email']}\n"\
"Contact name: #{row['contact name']}\n"\ "Contact name: #{row['contact name']}\n"\
"Contact phone: #{row['contact phone']}" "Contact phone: #{row['contact phone']}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment