From 6a4c5a77a4ef4b155224fef70aaecc655bce6a4e Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Mon, 7 Feb 2022 12:23:10 +0000 Subject: [PATCH] Method args --- app/helpers/check_answers_helper.rb | 2 +- app/views/form/_check_answers_table.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/check_answers_helper.rb b/app/helpers/check_answers_helper.rb index d8b72dc73..8828205c1 100644 --- a/app/helpers/check_answers_helper.rb +++ b/app/helpers/check_answers_helper.rb @@ -12,7 +12,7 @@ module CheckAnswersHelper end def get_answer_label(question, case_log) - if question.answer_label.present? + if question.answer_label(case_log).present? question.answer_label(case_log) else "You didn’t answer this question".html_safe diff --git a/app/views/form/_check_answers_table.html.erb b/app/views/form/_check_answers_table.html.erb index be019eefb..945e90085 100644 --- a/app/views/form/_check_answers_table.html.erb +++ b/app/views/form/_check_answers_table.html.erb @@ -2,7 +2,7 @@ <% unless question.id == "incfreq" %>
- <%= question.check_answer_label.to_s.present? ? question.check_answer_label.to_s : question.header.to_s %> + <%= question.check_answer_label.to_s.present? ? question.check_answer_label.to_s : question.header.to_s %>
<%= get_answer_label(question, @case_log) %>
@@ -14,4 +14,4 @@ <%= govuk_link_to(question.update_answer_link_name(@case_log), "/logs/#{@case_log.id}/#{question.page.id.to_s.dasherize}").html_safe %>
-<% end %> \ No newline at end of file +<% end %>