From 05bb6f726558062a3e15f3ae8158b1cfcf1b83f2 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Mon, 5 Dec 2022 13:56:14 +0000 Subject: [PATCH] refactor: simplify routing --- app/views/locations/index.html.erb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb index 97ff00b27..5040120d0 100644 --- a/app/views/locations/index.html.erb +++ b/app/views/locations/index.html.erb @@ -61,9 +61,7 @@ <% end %> <% end %> <% end %> - <%= form_with model: @scheme, url: scheme_locations_path(@scheme), method: "post", local: true do |f| %> - <%= f.govuk_submit "Add a location", secondary: true %> - <% end %> + <%= govuk_button_to "Add a location", scheme_locations_path(@scheme), method: "post", secondary: true %> @@ -117,9 +115,7 @@ <% end %> <% end %> <% end %> - <%= form_with model: @scheme, url: scheme_locations_path(@scheme), method: "post", local: true do |f| %> - <%= f.govuk_submit "Add a location", secondary: true %> - <% end %> + <%= govuk_button_to "Add a location", scheme_locations_path(@scheme), method: "post", secondary: true %> <% end %>