Permalink
Browse files

Make partials more resilient to missing data

  • Loading branch information...
mpatric committed Jan 2, 2012
1 parent 4fd1407 commit ec1776b9486200c83d6f3bee0d14e3d5b449dbc9
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/views/home/_contents.html.erb
  2. +1 −1 app/views/home/_tags.html.erb
@@ -1,4 +1,4 @@
-<% unless @all_posts.empty? %>
+<% if !@all_posts.nil? and @all_posts.any? %>
<div class='contents'>
<% unless @tag %>
<% unless @post %>
@@ -1,4 +1,4 @@
-<% unless @all_tags.empty? %>
+<% if !@all_tags.nil? and @all_tags.any? %>
<div class='tags'>
<h3>All tags</h3>
<ul>

0 comments on commit ec1776b

Please sign in to comment.