From 764eb05916e8ebbc1ad67a3ec0da3f280749e07f Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Tue, 30 Nov 2021 13:25:46 +0000 Subject: [PATCH] Use gem component --- app/views/organisations/show.html.erb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb index 29a0e69b3..de198e0bf 100644 --- a/app/views/organisations/show.html.erb +++ b/app/views/organisations/show.html.erb @@ -9,15 +9,11 @@ Your Organisation -
+<%= govuk_summary_list do |summary_list| %> <% @organisation.display_attributes.each do |attr, val| %> -
-
- <%= attr.to_s.humanize %> -
-
- <%= simple_format(val, {}, wrapper_tag: "div") %> -
-
+ <%= summary_list.row do |row| + row.key { attr.to_s.humanize } + row.value { simple_format(val, {}, wrapper_tag: "div") } + end %> <% end %> -
+<% end %>