diff options
Diffstat (limited to 'app/views/blog/shared/_posts.html.erb')
-rw-r--r-- | app/views/blog/shared/_posts.html.erb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/app/views/blog/shared/_posts.html.erb b/app/views/blog/shared/_posts.html.erb index cbf865f..24a8199 100644 --- a/app/views/blog/shared/_posts.html.erb +++ b/app/views/blog/shared/_posts.html.erb @@ -1,8 +1,10 @@ -<h2><%= t('.other') %></h2> -<ul id="blog_posts"> - <% @blog_posts.each do |blog_post| %> - <li class='clearfix'> - <%= link_to blog_post.title, blog_post_url(blog_post) %> - </li> - <% end %> -</ul> +<% if @blog_posts.many? %> + <h2><%= t('.other') %></h2> + <ul id="blog_posts"> + <% @blog_posts.each do |blog_post| %> + <li class='clearfix'> + <%= link_to blog_post.title, blog_post_url(blog_post) %> + </li> + <% end %> + </ul> +<% end %>
\ No newline at end of file |