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
0
Merge Requests
0
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
Nguyen Ngoc Nghia
VeNJOB
Commits
8ef1850c
Commit
8ef1850c
authored
Dec 12, 2019
by
nnnghia98
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first edit this branch
parent
98be312e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
app/models/city.rb
+4
-0
app/models/city_job.rb
+8
-0
app/models/job.rb
+2
-0
No files found.
app/models/city.rb
View file @
8ef1850c
...
...
@@ -14,6 +14,10 @@
#
class
City
<
ApplicationRecord
<<<<<<<
HEAD
scope
:vn_cities
,
->
{
where
region:
"Việt Nam"
}
scope
:inter_cities
,
->
{
where
region:
"#"
}
=======
has_many
:city_jobs
>>>>>>>
first
edit
this
branch
end
app/models/city_job.rb
View file @
8ef1850c
...
...
@@ -22,4 +22,12 @@
class
CityJob
<
ApplicationRecord
belongs_to
:city
belongs_to
:job
def
city_id
self
.
city
.
id
end
def
job_id
self
.
job
.
id
end
end
app/models/job.rb
View file @
8ef1850c
...
...
@@ -30,4 +30,6 @@
class
Job
<
ApplicationRecord
belongs_to
:company
has_many
:city_jobs
end
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