From efd4261598678118fc5d989e64f02b916739911d Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Wed, 12 Apr 2023 15:03:57 +0100 Subject: [PATCH] refactor: review response --- app/helpers/locations_helper.rb | 2 +- app/helpers/question_view_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/locations_helper.rb b/app/helpers/locations_helper.rb index 92e12f074..5bf7bc8ff 100644 --- a/app/helpers/locations_helper.rb +++ b/app/helpers/locations_helper.rb @@ -80,7 +80,7 @@ module LocationsHelper def location_creation_success_notice(location) if location.confirmed - "#{location.postcode} #{location.startdate.blank? || location.startdate < Time.zone.now ? 'has been' : 'will be'} added to this scheme" + "#{location.postcode} #{location.startdate.blank? || location.startdate.before?(Time.zone.now) ? 'has been' : 'will be'} added to this scheme" end end diff --git a/app/helpers/question_view_helper.rb b/app/helpers/question_view_helper.rb index f5e92cf1c..fdb144c4e 100644 --- a/app/helpers/question_view_helper.rb +++ b/app/helpers/question_view_helper.rb @@ -30,7 +30,7 @@ module QuestionViewHelper def answer_option_hint(resource) return unless resource.instance_of?(Scheme) - [resource.primary_client_group, resource.secondary_client_group].filter(&:present?).join(", ") + [resource.primary_client_group, resource.secondary_client_group].compact.join(", ") end private