diff --git a/app/controllers/recruitments_controller.rb b/app/controllers/recruitments_controller.rb index 1fe783d..8bbaf44 100644 --- a/app/controllers/recruitments_controller.rb +++ b/app/controllers/recruitments_controller.rb @@ -133,8 +133,20 @@ class RecruitmentsController < PseudoSessionController end def show_candidate(params) + rp = RecruitProfile.where(:uid => params[:uid]).first + profile = rp.profile + phone = !profile.country_code.nil? ? profile.country_code + " - " + profile.phone_number : profile.phone_number + skills = profile.skills { - "data" => {} + "data" => { + "name" => rp.name, + "job-title" => profile.desired_job_title, + "company-name" => profile.current_company, + "phone" => phone, + "email" => rp.email, + "website" => profile.website, + + } } end @@ -462,7 +474,7 @@ class RecruitmentsController < PseudoSessionController def profile_params par = params.require(:recruit_profile).permit! - if par[:employee_profile_attributes][:skills].present? + if par[:employee_profile_attributes].present? && par[:employee_profile_attributes][:skills].present? par[:employee_profile_attributes][:skills] = par[:employee_profile_attributes][:skills].split(",") par[:employee_profile_attributes][:skills].collect!{|sk| sk.strip} end