From 11daf0a9bb1d2d99d808f8a4dbd7a52583ae6ca2 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Wed, 21 Jun 2023 12:08:11 +0100 Subject: [PATCH] feat: just enforce names are strings adn remove humanization to display ID in caps as required --- app/models/organisation.rb | 4 ++-- app/views/organisations/show.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/organisation.rb b/app/models/organisation.rb index 2f4f8992e..69aa59c97 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -107,10 +107,10 @@ class Organisation < ApplicationRecord { name: "Name", value: name, editable: true }, { name: "Organisation ID", value: "ORG#{id}", editable: false }, { name: "Address", value: address_string, editable: true }, - { name: "Telephone_number", value: phone, editable: true }, + { name: "Telephone number", value: phone, editable: true }, { name: "Type of provider", value: display_provider_type, editable: false }, { name: "Registration number", value: housing_registration_no || "", editable: false }, - { name: "Rent_periods", value: rent_period_labels, editable: false, format: :bullet }, + { name: "Rent periods", value: rent_period_labels, editable: false, format: :bullet }, { name: "Owns housing stock", value: holds_own_stock ? "Yes" : "No", editable: false }, ].compact diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb index f1afb275c..e39338651 100644 --- a/app/views/organisations/show.html.erb +++ b/app/views/organisations/show.html.erb @@ -17,7 +17,7 @@ <% @organisation.display_organisation_attributes.each do |attr| %> <% if can_edit_org?(current_user) && attr[:editable] %> <%= summary_list.row do |row| %> - <% row.key { attr[:name].to_s.humanize } %> + <% row.key { attr[:name] } %> <% row.value { details_html(attr) } %> <% row.action( visually_hidden_text: attr[:name].to_s.humanize.downcase, @@ -27,7 +27,7 @@ <% end %> <% else %> <%= summary_list.row do |row| %> - <% row.key { attr[:name].to_s.humanize } %> + <% row.key { attr[:name] } %> <% row.value { details_html(attr) } %> <% row.action %> <% end %>