don't show endless comment link pages

stop when there are no more comments
This commit is contained in:
joshua stein 2014-01-08 20:41:52 -06:00
parent 2f824a73a3
commit 9bab78634e

View file

@ -12,9 +12,12 @@
Page <%= @page - 1 %></a>
<% end %>
<% if @page && @page > 1 %>
|
<% end %>
<% if @comments.any? %>
<% if @page && @page > 1 %>
|
<% end %>
<a href="/comments/page/<%= @page + 1 %>">Page <%= @page + 1 %> &gt;&gt;</a>
<a href="/comments/page/<%= @page + 1 %>">Page
<%= @page + 1 %> &gt;&gt;</a>
<% end %>
</div>