aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog/posts/_nav.html.erb
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2010-11-20 14:29:47 -0600
committerJoe Sak <joe@joesak.com>2010-11-20 14:29:47 -0600
commit44139cb7d87e6578d5b5df1b3b718164e0aad05b (patch)
treef42176dd0ee8b4375d22a207f70e82fbb2931571 /app/views/blog/posts/_nav.html.erb
parent2f94c8c08aec64403fdecf3a13d20dc35a595fb5 (diff)
downloadrefinerycms-blog-44139cb7d87e6578d5b5df1b3b718164e0aad05b.tar.gz
refinerycms-blog-44139cb7d87e6578d5b5df1b3b718164e0aad05b.tar.bz2
refinerycms-blog-44139cb7d87e6578d5b5df1b3b718164e0aad05b.zip
better conditional
Diffstat (limited to 'app/views/blog/posts/_nav.html.erb')
-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