From 0da306ef51eb6f2c301583e79d0231478527a89a Mon Sep 17 00:00:00 2001 From: starswan Date: Wed, 22 Jan 2025 11:12:53 +0000 Subject: [PATCH] delete unused code --- .../jobseekers/job_applications/build_controller.rb | 13 ++----------- .../job_application/professional_status_form.rb | 8 -------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/app/controllers/jobseekers/job_applications/build_controller.rb b/app/controllers/jobseekers/job_applications/build_controller.rb index e64afaa9ce..59a78fd1ed 100644 --- a/app/controllers/jobseekers/job_applications/build_controller.rb +++ b/app/controllers/jobseekers/job_applications/build_controller.rb @@ -60,10 +60,7 @@ def form_attributes case step when :professional_status - attributes.merge(jobseeker_profile_attributes) - .merge(trn_params) - # when :references - # attributes.merge(references: job_application.references) + attributes.merge(trn_params) when :employment_history attributes.merge(unexplained_employment_gaps: job_application.unexplained_employment_gaps) else @@ -108,7 +105,7 @@ def update_params end def update_fields - # This version doesn't work with date fields + # This version doesn't work with date fields as they are submitted in 3 parts (hence form_params doesn't contain the right key) # form_class.storable_fields.select { |f| form_params.key?(f) }.index_with { |field| form.public_send(field) } form_params.except(*form_class.unstorable_fields) end @@ -121,12 +118,6 @@ def vacancy @vacancy ||= job_application.vacancy end - def jobseeker_profile_attributes - { - jobseeker_profile: current_jobseeker.jobseeker_profile, - } - end - def trn_params { teacher_reference_number: form_params[:teacher_reference_number] || current_jobseeker&.jobseeker_profile&.teacher_reference_number, diff --git a/app/form_models/jobseekers/job_application/professional_status_form.rb b/app/form_models/jobseekers/job_application/professional_status_form.rb index b6b4b20eef..e52f393032 100644 --- a/app/form_models/jobseekers/job_application/professional_status_form.rb +++ b/app/form_models/jobseekers/job_application/professional_status_form.rb @@ -31,14 +31,6 @@ def load_form(model) end end - def statutory_induction_complete_options - [ - ["yes", I18n.t("helpers.label.jobseekers_job_application_professional_status_form.statutory_induction_complete_options.yes")], - ["no", I18n.t("helpers.label.jobseekers_job_application_professional_status_form.statutory_induction_complete_options.no")], - - ] - end - def initialize(attributes = {}) jobseeker_profile = attributes.delete(:jobseeker_profile) super