Update Job model to reference base_job
This commit is contained in:
parent
4ee90f6c09
commit
bd33ee44fc
1 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue