Update Job model to reference base_job

This commit is contained in:
Justin Edmund 2022-12-03 11:44:09 -08:00
parent 4ee90f6c09
commit bd33ee44fc

View file

@ -1,7 +1,12 @@
class Job < ApplicationRecord
belongs_to :party
belongs_to :base_job,
foreign_key: 'base_job_id',
class_name: 'Job',
optional: true
def display_resource(job)
job.name_en
job.name_en
end
end