From 6382028142ecb4c8616d7662fcbad68064c806fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 4 May 2022 15:58:55 +0200 Subject: [PATCH] Use page_path to generate the census_terms URL We had a link to `/census_terms`, and by looking at the code, it wasn't so clear where this URL came from. Using `page_path`, it's easier to understand that it comes from a page with the `census_term` slug. It also means we'll find this line when searching for usages of `page_path` in the code. --- app/views/verification/residence/new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/verification/residence/new.html.erb b/app/views/verification/residence/new.html.erb index 052527842..817408bc6 100644 --- a/app/views/verification/residence/new.html.erb +++ b/app/views/verification/residence/new.html.erb @@ -76,7 +76,7 @@ <%= f.check_box :terms_of_service, title: t("verification.residence.new.accept_terms_text_title"), label: t("verification.residence.new.accept_terms_text", - terms_url: link_to(t("verification.residence.new.terms"), "/census_terms", + terms_url: link_to(t("verification.residence.new.terms"), page_path("census_terms"), title: t("shared.target_blank"), target: "_blank") ) %>