From a2e74b32ab9b72464b720be3b6feeef2429b81b7 Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 4 Oct 2021 15:29:44 +0100 Subject: [PATCH] shuffle if statement --- app/helpers/tasklist_helper.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/helpers/tasklist_helper.rb b/app/helpers/tasklist_helper.rb index 48853c54a..3a88d6667 100644 --- a/app/helpers/tasklist_helper.rb +++ b/app/helpers/tasklist_helper.rb @@ -17,12 +17,9 @@ module TasklistHelper if subsection_name == "declaration" return all_questions_completed(case_log) ? :not_started : :cannot_start_yet end - if questions.all? {|question| case_log[question].blank?} - return :not_started - end - if questions.all? {|question| case_log[question].present?} - return :completed - end + + return :not_started if questions.all? {|question| case_log[question].blank?} + return :completed if questions.all? {|question| case_log[question].present?} :in_progress end