diff --git a/app/models/recruitment_job.rb b/app/models/recruitment_job.rb index 6cb2732..ed01b98 100644 --- a/app/models/recruitment_job.rb +++ b/app/models/recruitment_job.rb @@ -50,7 +50,7 @@ class RecruitmentJob scope :jobs, ->{where(:post_type => "type1")} scope :internships, ->{where(:post_type => "type2")} scope :exchanges, ->{where(:post_type => "type3")} - scope :not_expired, ->{any_of({:expiry_date.lte => Time.now}, {:expiry_date => nil})} + scope :not_expired, ->{where(:expiry_date.gte => Time.now, :expiry_date => nil)} def get_category RecruitmentCategory.find(self.category).job_category rescue ""