From 31741ba146c2e828f46a6f3c214c4da104b95d6e Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Wed, 30 Nov 2022 09:17:05 +0000 Subject: [PATCH] feat: use rails route --- app/views/locations/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb index 34872141b..a8e8a11c0 100644 --- a/app/views/locations/index.html.erb +++ b/app/views/locations/index.html.erb @@ -52,7 +52,7 @@ <%= table.body do |body| %> <%= body.row do |row| %> <% row.cell(text: location.id) %> - <% row.cell(text: simple_format(location_cell_postcode(location, "/schemes/#{@scheme.id}/locations/#{location.id}#{'/check-answers' if location.incomplete?}"), { class: "govuk-!-font-weight-bold" }, wrapper_tag: "div")) %> + <% row.cell(text: simple_format(location_cell_postcode(location, location.incomplete? ? scheme_location_check_answers_path(@scheme, location) : scheme_location_path(@scheme, location)), { class: "govuk-!-font-weight-bold" }, wrapper_tag: "div")) %> <% row.cell(text: location.units) %> <% row.cell(text: simple_format("#{location.type_of_unit}")) %> <% row.cell(text: location.mobility_type) %>