small fix

This commit is contained in:
Bomrah Harry 2018-07-18 19:50:44 +08:00
parent 1b97fb0aa7
commit ed9da67a27
1 changed files with 2 additions and 2 deletions

View File

@ -696,8 +696,8 @@ class RecruitmentsController < PseudoSessionController
candidates = [] candidates = []
keywords = params[:q].split(",").collect{|s| /#{s.strip}/i} keywords = params[:q].split(",").collect{|s| /#{s.strip}/i}
names = RecruitProfile.any_of({:first_name.in => keywords}, {:last_name.in => keywords}).pluck(:id) names = RecruitProfile.any_of({:first_name.in => keywords}, {:last_name.in => keywords}).pluck(:id)
designations = EmployerProfile.where(:desired_job_title.in => keywords) designations = EmployeeProfile.where(:desired_job_title.in => keywords)
skills = EmployerProfile.where(:skills.in => keywords) skills = EmployeeProfile.where(:skills.in => keywords)
query = [] query = []
if names.count > 0 if names.count > 0
query << {:recruit_profile_id.in => names} query << {:recruit_profile_id.in => names}