From 317ec37201864438511e60bda100188fbd93e9ac Mon Sep 17 00:00:00 2001 From: jamesprior Date: Tue, 25 Mar 2014 13:12:52 -0400 Subject: [PATCH] Do not return nil in the list of sections in case there is a problem with the data --- app/models/cms/section.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/cms/section.rb b/app/models/cms/section.rb index 9708c2813..7eeeea005 100644 --- a/app/models/cms/section.rb +++ b/app/models/cms/section.rb @@ -67,7 +67,7 @@ def ensure_section_node_exists def sections child_nodes.of_type(SECTION).fetch_nodes.in_order.collect do |section_node| section_node.node - end + end.compact end alias :child_sections :sections