Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob_nth
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
3
Merge Requests
3
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
Ngô Trung Hưng
venjob_nth
Commits
39a4990a
Commit
39a4990a
authored
Aug 06, 2020
by
Ngô Trung Hưng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
joblist beta
parent
d4ef13ab
Pipeline
#822
failed with stages
in 0 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
7 deletions
+5
-7
app/controllers/job_controller.rb
+0
-2
app/models/city.rb
+1
-1
app/models/industry.rb
+1
-1
config/routes.rb
+2
-2
lib/tasks/crawler.rake
+1
-1
No files found.
app/controllers/job_controller.rb
View file @
39a4990a
...
...
@@ -23,4 +23,3 @@ class JobController < ApplicationController
render
'result_data'
end
end
Object
.
const_get
(
'cities'
.
classify
)
\ No newline at end of file
app/models/city.rb
View file @
39a4990a
...
...
@@ -17,6 +17,6 @@ class City < ApplicationRecord
end
def
convert_to_slug
self
.
slug
=
Slug
.
to_slug
(
self
.
name
)
self
.
slug
=
Slug
.
to_slug
(
self
.
name
+
' '
+
rand
(
10000
).
to_s
)
end
end
app/models/industry.rb
View file @
39a4990a
...
...
@@ -12,6 +12,6 @@ class Industry < ApplicationRecord
end
def
convert_to_slug
self
.
slug
=
Slug
.
to_slug
(
self
.
name
)
self
.
slug
=
Slug
.
to_slug
(
self
.
name
+
' '
+
rand
(
10000
).
to_s
)
end
end
config/routes.rb
View file @
39a4990a
...
...
@@ -2,8 +2,8 @@
Rails
.
application
.
routes
.
draw
do
root
'home#index'
get
'industr
y/index'
get
'cit
y/index'
get
'industr
ies'
,
to:
'industry#index'
,
as: :industry_index
get
'cit
ies'
,
to:
'city#index'
,
as: :city_index
# Search
get
'jobs/:model/:slug'
,
to:
'job#index'
,
as: :jobs
...
...
lib/tasks/crawler.rake
View file @
39a4990a
...
...
@@ -5,7 +5,7 @@ require 'open-uri'
# rake task
namespace
:crawler
do
task
populate: :environment
do
NUMBER_LINK_WILL_BE_CRAWLER
=
7
NUMBER_LINK_WILL_BE_CRAWLER
=
6
Company
.
find_or_create_by
(
name:
'Bảo mật'
)
do
|
company
|
company
.
address
=
'Vui lòng xem trong mô tả công việc'
company
.
short_description
=
'Vui lòng xem trong mô tả công việc'
...
...
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