recruitment/app/models/employee_job_application.rb

16 lines
332 B
Ruby
Raw Normal View History

2018-01-01 13:52:15 +00:00
class EmployeeJobApplication
include Mongoid::Document
include Mongoid::Timestamps
field :job
field :cover_letter
field :archived, type: Boolean, :default => false
2018-01-01 13:52:15 +00:00
belongs_to :employee_profile
scope :not_archived, ->{ where(:archived => false) }
2018-01-01 13:52:15 +00:00
def get_job
RecruitmentJob.find(self.job) rescue nil
end
end