hensei-api/app/models/job.rb
Justin Edmund 2facc646d1 Update job class
To have many job skills
2023-06-04 22:56:01 -07:00

19 lines
345 B
Ruby

# frozen_string_literal: true
class Job < ApplicationRecord
belongs_to :party
has_many :skills, class_name: 'JobSkill'
belongs_to :base_job,
foreign_key: 'base_job_id',
class_name: 'Job',
optional: true
def blueprint
JobBlueprint
end
def display_resource(job)
job.name_en
end
end