From 5bf2b41fa29d27eedc4a9452c3c2b5c748b0aad3 Mon Sep 17 00:00:00 2001 From: Richard Lynch Date: Thu, 7 Nov 2024 10:53:32 +0000 Subject: [PATCH] Fix assigning SLC plan 1 When a claim without a student loan plan is amended the student loan plan was being set to Plan 1, the default option in the list. This commit includes a blank option so unrelated amendments on a claims without a plan don't send up the Plan 1 value. --- app/views/admin/amendments/new.html.erb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/admin/amendments/new.html.erb b/app/views/admin/amendments/new.html.erb index 416d8b8dc0..06b601af38 100644 --- a/app/views/admin/amendments/new.html.erb +++ b/app/views/admin/amendments/new.html.erb @@ -95,7 +95,12 @@
- <%= claim_form.select :student_loan_plan, Claim::STUDENT_LOAN_PLAN_OPTIONS.map { |option| [option.humanize, option] }, {}, { class: "govuk-select" } %> + <%= claim_form.select( + :student_loan_plan, + Claim::STUDENT_LOAN_PLAN_OPTIONS.map { |option| [option.humanize, option] }, + { include_blank: true }, + { class: "govuk-select" } + ) %>