diff --git a/app/views/form/check_answers.html.erb b/app/views/form/check_answers.html.erb index 774081a4d..3da071be5 100644 --- a/app/views/form/check_answers.html.erb +++ b/app/views/form/check_answers.html.erb @@ -1,8 +1,7 @@ <% content_for :title, "#{subsection.id.humanize} - Check your answers" %> -<% class_name = @log.class.name.underscore %> <% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: { - "Logs" => send("#{class_name.pluralize}_path"), - "Log #{@log.id}" => send("#{class_name}_path", @log), + "Logs" => url_for(@log.class), + "Log #{@log.id}" => url_for(@log), subsection.label => "", }) %> diff --git a/app/views/form/review.html.erb b/app/views/form/review.html.erb index 8c626beec..3268df478 100644 --- a/app/views/form/review.html.erb +++ b/app/views/form/review.html.erb @@ -1,9 +1,9 @@ -<% class_name = @log.class.name.underscore %> -<% content_for :title, "Review #{class_name.humanize(capitalize: false)}" %> +<% class_name = @log.class.name.underscore.humanize(capitalize: false) %> +<% content_for :title, "Review #{class_name}" %> <% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: { - "Logs" => send("#{class_name.pluralize}_path"), - "Log #{@log.id}" => send("#{class_name}_path", @log.id), - "Review #{class_name.humanize(capitalize: false)}" => "", + "Logs" => url_for(@log.class), + "Log #{@log.id}" => url_for(@log), + "Review #{class_name}" => "", }) %>