Browse Source

Method args

pull/273/head
baarkerlounger 3 years ago committed by MadeTech Dushan
parent
commit
6a4c5a77a4
  1. 2
      app/helpers/check_answers_helper.rb
  2. 4
      app/views/form/_check_answers_table.html.erb

2
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
"<span class=\"app-!-colour-muted\">You didn’t answer this question</span>".html_safe

4
app/views/form/_check_answers_table.html.erb

@ -2,7 +2,7 @@
<% unless question.id == "incfreq" %>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
<%= 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 %>
</dt>
<dd class="govuk-summary-list__value">
<%= get_answer_label(question, @case_log) %><br/>
@ -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 %>
</dd>
</div>
<% end %>
<% end %>

Loading…
Cancel
Save