From f9cb8386413bc50d9ff5d2e1fd8a09f6091a9b86 Mon Sep 17 00:00:00 2001 From: Kat Date: Fri, 15 Oct 2021 12:13:05 +0100 Subject: [PATCH] Rename method --- app/helpers/tasklist_helper.rb | 2 +- app/views/case_logs/edit.html.erb | 2 +- spec/helpers/tasklist_helper_spec.rb | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/helpers/tasklist_helper.rb b/app/helpers/tasklist_helper.rb index 549ef2d22..b6bceda78 100644 --- a/app/helpers/tasklist_helper.rb +++ b/app/helpers/tasklist_helper.rb @@ -29,7 +29,7 @@ module TasklistHelper subsections.find { |subsection| is_incomplete?(subsection, case_log, form.questions_for_subsection(subsection).keys) } end - def get_sections_count(form, case_log, status = :all) + def get_subsections_count(form, case_log, status = :all) subsections = form.all_subsections.keys return subsections.count if status == :all diff --git a/app/views/case_logs/edit.html.erb b/app/views/case_logs/edit.html.erb index f4e2d346d..551ce0cb5 100644 --- a/app/views/case_logs/edit.html.erb +++ b/app/views/case_logs/edit.html.erb @@ -6,7 +6,7 @@

This submission is <%= @case_log.status %>

-

You've completed <%= get_sections_count(@form, @case_log, :completed) %> of <%= get_sections_count(@form, @case_log, :all) %> sections.

+

You've completed <%= get_subsections_count(@form, @case_log, :completed) %> of <%= get_subsections_count(@form, @case_log, :all) %> sections.

<% next_incomplete_section=get_next_incomplete_section(@form, @case_log) %>