From 2a0dc92538e610b7821eda3487d9e1bf3fac64f2 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Mon, 13 Dec 2010 11:02:29 +1300 Subject: Make the body content work when there are not this many parts. --- app/views/blog/posts/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/views/blog/posts/index.html.erb b/app/views/blog/posts/index.html.erb index a9c3fde..766d689 100644 --- a/app/views/blog/posts/index.html.erb +++ b/app/views/blog/posts/index.html.erb @@ -1,5 +1,5 @@ <% content_for :body_content_left do %> - <%= @page[Page.default_parts.first.to_sym].html_safe %> + <%= @page[Page.default_parts.first.to_sym].html_safe if Page.default_parts.any? %> <% if @blog_posts.any? %>
@@ -11,7 +11,7 @@ <% end %> <% content_for :body_content_right do %> - <%= @page[Page.default_parts.second.to_sym].html_safe %> + <%= @page[Page.default_parts.second.to_sym].html_safe if Page.default_parts.many? %> <%= render :partial => "/blog/shared/categories" %> <%= render :partial => "/blog/shared/rss_feed" %> -- cgit v1.2.3