Commit 8ef1850c by nnnghia98

first edit this branch

parent 98be312e
......@@ -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
......@@ -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
......@@ -30,4 +30,6 @@
class Job < ApplicationRecord
belongs_to :company
has_many :city_jobs
end
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