Skip to content
Browse files

Protection for when there are no articles, hence no most popular article

  • Loading branch information...
1 parent 35a46ac commit 78e07a9f6cc818c957d42fedb18d779c7c7f0fc8 @jcasimir jcasimir committed Jan 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/views/dashboard/show.html.erb
2 app/views/dashboard/show.html.erb
@@ -37,6 +37,6 @@
<li id='total_article_words'>Words in all articles: <%= @article_word_count %></li>
<li id='total_comment_words'>Words in all comments: <%= @comment_word_count %></li>
<li id='total_words'>Total Words: <%= @article_word_count + @comment_word_count %></li>
- <li id='most_popular'>Most Popular Article: <%= link_to @most_popular_article.title, @most_popular_article %></li>
+ <li id='most_popular'>Most Popular Article: <%= link_to @most_popular_article.title, @most_popular_article if @most_popular_article %></li>

0 comments on commit 78e07a9

Please sign in to comment.
Something went wrong with that request. Please try again.