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
c4c3b235
Commit
c4c3b235
authored
Aug 05, 2020
by
Ngô Trung Hưng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
..
parent
1342036a
Pipeline
#808
canceled with stages
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
app/controllers/job_controller.rb
+3
-2
config/routes.rb
+2
-3
lib/tasks/crawler.rake
+1
-1
No files found.
app/controllers/job_controller.rb
View file @
c4c3b235
...
@@ -19,8 +19,9 @@ class JobController < ApplicationController
...
@@ -19,8 +19,9 @@ class JobController < ApplicationController
result
(
company
)
result
(
company
)
end
end
def
find_jobs_by
(
model
,
parameter
)
def
find_jobs
obj
=
model
.
find
(
parameter
)
d
=
params
[
:model
].
capitalize
obj
=
.
find
(
params
[
:id
])
result
(
obj
)
result
(
obj
)
end
end
...
...
config/routes.rb
View file @
c4c3b235
...
@@ -6,7 +6,6 @@ Rails.application.routes.draw do
...
@@ -6,7 +6,6 @@ Rails.application.routes.draw do
get
'city/index'
get
'city/index'
# Search
# Search
get
'jobs/industry/:key_industry'
,
to:
'job#find_jobs_by_industry'
get
'jobs/:model/:id'
,
to:
'job#find_jobs'
get
'jobs/company/:key_company'
,
to:
'job#find_jobs_by_company'
get
'jobs/city/:key_city'
,
to:
'job#find_jobs_by_city'
end
end
lib/tasks/crawler.rake
View file @
c4c3b235
...
@@ -5,7 +5,7 @@ require 'open-uri'
...
@@ -5,7 +5,7 @@ require 'open-uri'
# rake task
# rake task
namespace
:crawler
do
namespace
:crawler
do
task
populate: :environment
do
task
populate: :environment
do
NUMBER_LINK_WILL_BE_CRAWLER
=
1
NUMBER_LINK_WILL_BE_CRAWLER
=
4
Company
.
find_or_create_by
(
name:
'Bảo mật'
)
do
|
company
|
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
.
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'
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