fix for expired
This commit is contained in:
parent
434df605a7
commit
e7ee67fead
|
@ -50,7 +50,7 @@ class RecruitmentJob
|
||||||
scope :jobs, ->{where(:post_type => "type1")}
|
scope :jobs, ->{where(:post_type => "type1")}
|
||||||
scope :internships, ->{where(:post_type => "type2")}
|
scope :internships, ->{where(:post_type => "type2")}
|
||||||
scope :exchanges, ->{where(:post_type => "type3")}
|
scope :exchanges, ->{where(:post_type => "type3")}
|
||||||
scope :excluded_expired, ->{where(:expiry_date.gte => Time.now)}
|
scope :excluded_expired, ->{any_of({:expiry_date.gte => Time.now}, {:expiry_date => nil})}
|
||||||
|
|
||||||
def get_category
|
def get_category
|
||||||
RecruitmentCategory.find(self.category).job_category rescue ""
|
RecruitmentCategory.find(self.category).job_category rescue ""
|
||||||
|
|
Loading…
Reference in New Issue