diff options
author | Joe Sak <joe@joesak.com> | 2010-11-20 14:29:47 -0600 |
---|---|---|
committer | Joe Sak <joe@joesak.com> | 2010-11-20 14:29:47 -0600 |
commit | 44139cb7d87e6578d5b5df1b3b718164e0aad05b (patch) | |
tree | f42176dd0ee8b4375d22a207f70e82fbb2931571 /app/views | |
parent | 2f94c8c08aec64403fdecf3a13d20dc35a595fb5 (diff) | |
download | refinerycms-blog-44139cb7d87e6578d5b5df1b3b718164e0aad05b.tar.gz refinerycms-blog-44139cb7d87e6578d5b5df1b3b718164e0aad05b.tar.bz2 refinerycms-blog-44139cb7d87e6578d5b5df1b3b718164e0aad05b.zip |
better conditional
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/blog/posts/_nav.html.erb | 10 |
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) + " »"), @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) + " »"), @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 "« ".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 "« ".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 |