From 0a5d562516bc71bd9e4e751e59fbedadb3f193f5 Mon Sep 17 00:00:00 2001 From: Amol HATWAR Date: Sun, 9 Aug 2015 18:12:43 +0530 Subject: [PATCH] DOM pollution in new issues form for custom fields The DOM is getting polluted with unnecessary ``splitcontent`` divs for ``custom_field_values`` even when there are absolutely none defined. This patch checks for that before rendering the patrial. --- app/views/issues/_attributes.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index 3d5f85c..b08f484 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -70,7 +70,7 @@ -<% if @issue.safe_attribute? 'custom_field_values' %> +<% if !@issue.custom_field_values.blank? && @issue.safe_attribute?('custom_field_values') %> <%= render :partial => 'issues/form_custom_fields' %> <% end %> -- 2.5.0