Permalink
Browse files

Previous/Next link now shows article title.

  • Loading branch information...
yoosee committed Mar 1, 2017
1 parent 2b2a2c5 commit fef017cc1f379b9fb7e6f529b113082d6c0dd6e7
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/views/articles/show.html.erb
@@ -43,12 +43,12 @@
<!-- Pager -->
<ul class="pager">
<% if @article.previous %>
<li class="previous"><%= link_to ("&larr; Older").html_safe, @article.previous.url, title: @article.previous.title %></li>
<li class="previous"><%= link_to ("&larr; Older: #{@article.previous.title}").html_safe, @article.previous.url, title: @article.previous.title %></li>
<% else %>
<li class="previous disabled"><%= link_to ("&larr; Older").html_safe, '#' %></li>
<% end %>
<% if @article.next %>
<li class="next"><%= link_to ("Newer &rarr;").html_safe, @article.next.url, title: @article.next.title %></li>
<li class="next"><%= link_to ("Newer: #{@article.next.title} &rarr;").html_safe, @article.next.url, title: @article.next.title %></li>
<% else %>
<li class="next disabled"><%= link_to ("Newer &rarr;").html_safe, '#' %></li>
<% end %>

0 comments on commit fef017c

Please sign in to comment.