Permalink
Browse files

Hide headers if no objects in that collection

  • Loading branch information...
davidjrice committed Sep 15, 2011
1 parent 4d9e361 commit f2d33fbd20b7b5bacc8e2965c12014b795316332
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/views/links/index.html.erb
@@ -4,18 +4,18 @@
</div>
</div>
<div class="container">
- <h3>Popular</h3>
<%- if @popular.size > 0 -%>
+ <h3>Popular</h3>
<%= render 'links', :links => @popular %>
<%- end -%>
- <h3>My Links</h3>
<%- if @my_links.size > 0 -%>
+ <h3>My Links</h3>
<%= render 'links', :links => @my_links %>
<%- end -%>
- <h3>Recent</h3>
<%- if @recent.size > 0 -%>
+ <h3>Recent</h3>
<%= render 'links', :links => @recent %>
<%- end -%>
</div>

0 comments on commit f2d33fb

Please sign in to comment.