From f56ea25b125c6baf06bc1c2d33f70ee9df9b300c Mon Sep 17 00:00:00 2001 From: Paul Hayes Date: Mon, 24 Apr 2017 16:51:03 +0100 Subject: [PATCH] Don't render description when none Avoid printing an empty paragraph when there is no description. * Some specialist documents have no description * Description is required, but it can be an empty string Live example: https://www.gov.uk/aaib-reports/vans-rv-9a-g-cdmf-2-september-2007 --- app/views/shared/_description.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/shared/_description.html.erb b/app/views/shared/_description.html.erb index 983679604..0fe54af3a 100644 --- a/app/views/shared/_description.html.erb +++ b/app/views/shared/_description.html.erb @@ -1,3 +1,5 @@ -

- <%= nbsp_between_last_two_words(description) %> -

+<% if description.present? %> +

+ <%= nbsp_between_last_two_words(description) %> +

+<% end %>