better conditional
This commit is contained in:
parent
2f94c8c08a
commit
44139cb7d8
1 changed files with 8 additions and 2 deletions
|
@ -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? %>
|
||||
|
||||
<% 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 -%>
|
Loading…
Add table
Add a link
Reference in a new issue