aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/blog/posts/_nav.html.erb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/views/blog/posts/_nav.html.erb b/app/views/blog/posts/_nav.html.erb
index 6a36a10..3f9f80b 100644
--- a/app/views/blog/posts/_nav.html.erb
+++ b/app/views/blog/posts/_nav.html.erb
@@ -1,3 +1,9 @@
-<%= link_to raw(truncate(@blog_post.next.title) + "&nbsp;&#187;"), @blog_post.next, :class => 'next', :"data-nav-url" => update_blog_nav_path(@blog_post.next) if @blog_post.next.present? %>
+<% if @blog_post.next.present? -%>
+ <%= link_to raw(truncate(@blog_post.next.title) + "&nbsp;&#187;"), @blog_post.next, :class => 'next', :"data-nav-url" => update_blog_nav_path(@blog_post.next) %>
+<% end -%>
+
<%= link_to 'Blog Home', blog_root_path, :class => 'home' %>
-<%= link_to "&#171;&nbsp;".html_safe + truncate(@blog_post.prev.title), @blog_post.prev, :class => 'prev', :"data-nav-url" => update_blog_nav_path(@blog_post.prev) if @blog_post.prev.present? %> \ No newline at end of file
+
+<% if @blog_post.prev.present? -%>
+ <%= link_to "&#171;&nbsp;".html_safe + truncate(@blog_post.prev.title), @blog_post.prev, :class => 'prev', :"data-nav-url" => update_blog_nav_path(@blog_post.prev) %>
+<% end -%> \ No newline at end of file