This commit is contained in:
Bomrah Harry 2018-07-18 22:04:12 +08:00
parent c9da34e059
commit b31a908136
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class RecruitmentJob
scope :jobs, ->{where(:post_type => "type1")}
scope :internships, ->{where(:post_type => "type2")}
scope :exchanges, ->{where(:post_type => "type3")}
scope :not_expired, ->{where(:expiry_date.gte => Time.now, :expiry_date => nil)}
scope :not_expired, ->{where(:expiry_date.gte => Time.now).or(:expiry_date => nil)}
def get_category
RecruitmentCategory.find(self.category).job_category rescue ""