From ca1156686d33d4e9a0efbabaf85c6977edb9dc06 Mon Sep 17 00:00:00 2001 From: Arthur Campbell Date: Thu, 16 Mar 2023 11:19:45 +0000 Subject: [PATCH] ensure check your answers pages have the correct links in the breadcrumbs --- app/views/form/check_answers.html.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/form/check_answers.html.erb b/app/views/form/check_answers.html.erb index 46a945017..774081a4d 100644 --- a/app/views/form/check_answers.html.erb +++ b/app/views/form/check_answers.html.erb @@ -1,9 +1,10 @@ <% content_for :title, "#{subsection.id.humanize} - Check your answers" %> +<% class_name = @log.class.name.underscore %> <% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: { - "Logs" => "/logs", - "Log #{@log.id}" => send("#{@log.class.name.underscore}_path", @log), + "Logs" => send("#{class_name.pluralize}_path"), + "Log #{@log.id}" => send("#{class_name}_path", @log), subsection.label => "", - }) %> +}) %>