From bccf49777ce91d7797270f722d0db2fdd3875bc5 Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Wed, 7 Feb 2024 12:09:21 +0000 Subject: [PATCH] Refactor ifs --- app/models/form/sales/questions/gender_identity2.rb | 6 +++--- app/models/form/sales/questions/person_gender_identity.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/models/form/sales/questions/gender_identity2.rb b/app/models/form/sales/questions/gender_identity2.rb index 3bbf51a01..87c155acb 100644 --- a/app/models/form/sales/questions/gender_identity2.rb +++ b/app/models/form/sales/questions/gender_identity2.rb @@ -24,8 +24,8 @@ class Form::Sales::Questions::GenderIdentity2 < ::Form::Question }.freeze def hint_text - if form.start_year_after_2024? - "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - end + return unless form.start_year_after_2024? + + "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." end end diff --git a/app/models/form/sales/questions/person_gender_identity.rb b/app/models/form/sales/questions/person_gender_identity.rb index 5ea5535d9..e2da876a4 100644 --- a/app/models/form/sales/questions/person_gender_identity.rb +++ b/app/models/form/sales/questions/person_gender_identity.rb @@ -23,8 +23,8 @@ class Form::Sales::Questions::PersonGenderIdentity < ::Form::Question }.freeze def hint_text - if form.start_year_after_2024? - "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - end + return unless form.start_year_after_2024? + + "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." end end