From 1e7370fc998c64c42606b676c7003dd4bd82436b Mon Sep 17 00:00:00 2001
From: Harald Eilertsen <haraldei@anduin.net>
Date: Sat, 30 Dec 2017 15:31:55 +0100
Subject: Make the sidebar processing more robust when there's nothing to show.

---
 app/helpers/sidebar_helper.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'app/helpers')

diff --git a/app/helpers/sidebar_helper.rb b/app/helpers/sidebar_helper.rb
index e8e076a..97bb560 100644
--- a/app/helpers/sidebar_helper.rb
+++ b/app/helpers/sidebar_helper.rb
@@ -15,6 +15,6 @@ module SidebarHelper
 
   def page_has_side_body?(page)
     part = page.part_with_title("Side Body")
-    return part.present? && !part.body.empty?
+    return part.present? && !part.try(:body).try(:empty?)
   end
 end
-- 
cgit v1.2.3


From a45c1191c7d0cced2e069fe558124bb36c436828 Mon Sep 17 00:00:00 2001
From: Harald Eilertsen <haraldei@anduin.net>
Date: Sat, 6 Jan 2018 19:08:27 +0100
Subject: Just turn off display of page side body.

---
 app/helpers/sidebar_helper.rb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'app/helpers')

diff --git a/app/helpers/sidebar_helper.rb b/app/helpers/sidebar_helper.rb
index 97bb560..ad9c6de 100644
--- a/app/helpers/sidebar_helper.rb
+++ b/app/helpers/sidebar_helper.rb
@@ -14,7 +14,8 @@ module SidebarHelper
   end
 
   def page_has_side_body?(page)
-    part = page.part_with_title("Side Body")
-    return part.present? && !part.try(:body).try(:empty?)
+    #part = page.part_with_title("Side Body")
+    #return part.present? && !part.try(:body).try(:empty?)
+    false
   end
 end
-- 
cgit v1.2.3