diff --git a/app/controllers/recruitments_controller.rb b/app/controllers/recruitments_controller.rb index 1c347f2..1bb1355 100644 --- a/app/controllers/recruitments_controller.rb +++ b/app/controllers/recruitments_controller.rb @@ -83,13 +83,13 @@ class RecruitmentsController < PseudoSessionController rjobs = RecruitmentJob.where(:post_type => type).not_filled end if !rjobs.nil? && !rjobs.is_a?(Array) - rjobs = rjobs.desc(:created_at).page(OrbitHelper.page_number).per(OrbitHelper.page_data_count) + rjobs = rjobs.excluded_expired.desc(:created_at).page(OrbitHelper.page_number).per(OrbitHelper.page_data_count) total_pages = rjobs.total_pages else rjobs = [] total_pages = 0 end - rjobs = rjobs.excluded_expired + rjobs.each do |rj| if rj.work_experience_years == 0 && rj.work_experience_months == 0 wey = t("recruitment.fresher") @@ -490,11 +490,11 @@ class RecruitmentsController < PseudoSessionController end def create_experience - if params[:commit] == "Add" + if params[:commit] == "Add" || params[:commit] == "新增" academic = EmployeeExperience.create(employee_exp_params) redirect_to employee_experience_path - elsif params[:commit] = "Finish" - if params[:employee_experience][:job_title].present? || params[:employee_experience][:company_name].present? + elsif params[:commit] = "Finish" || params[:commit] == "完成" + if params[:employee_experience][:job_title_translations].present? || params[:employee_experience][:company_name_translations].present? academic = EmployeeExperience.create(employee_exp_params) end redirect_to mydashboard_path