Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make partials more resilient to missing data

  • Loading branch information...
commit ec1776b9486200c83d6f3bee0d14e3d5b449dbc9 1 parent 4fd1407
@mpatric authored
View
2  app/views/home/_contents.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 %>
View
2  app/views/home/_tags.html.erb
@@ -1,4 +1,4 @@
-<% unless @all_tags.empty? %>
+<% if !@all_tags.nil? and @all_tags.any? %>
<div class='tags'>
<h3>All tags</h3>
<ul>
Please sign in to comment.
Something went wrong with that request. Please try again.