Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VeNJob
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tô Ngọc Ánh
VeNJob
Commits
4299f1aa
Commit
4299f1aa
authored
Aug 06, 2020
by
Tô Ngọc Ánh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add strip to company in csv
parent
831d463f
Pipeline
#833
failed with stages
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
lib/common/csv.rb
+1
-1
No files found.
lib/common/csv.rb
View file @
4299f1aa
...
@@ -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'
]
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment