diff options
-rw-r--r-- | app/models/categorization.rb | 4 | ||||
-rw-r--r-- | app/views/blog/posts/_post.html.erb | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/app/models/categorization.rb b/app/models/categorization.rb index 32e9967..20821d4 100644 --- a/app/models/categorization.rb +++ b/app/models/categorization.rb @@ -1,5 +1,9 @@ class Categorization < ActiveRecord::Base + set_table_name 'blog_categories_blog_posts' belongs_to :blog_post belongs_to :blog_category + + has_friendly_id :title, :use_slug => true + end
\ No newline at end of file diff --git a/app/views/blog/posts/_post.html.erb b/app/views/blog/posts/_post.html.erb index d1c204e..f589a33 100644 --- a/app/views/blog/posts/_post.html.erb +++ b/app/views/blog/posts/_post.html.erb @@ -14,7 +14,7 @@ <aside class='filed_in'> <%= t('blog.posts.show.filed_in') %> <% categories.each_with_index do |category, index| %> - <%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %> + <%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %> <% end %> </aside> <% end %> @@ -27,6 +27,4 @@ <% end %> </article> <%= render :partial => '/shared/draft_page_message' unless @blog_post.nil? or @blog_post.live? -%> -<% if next_or_previous?(@blog_post) -%> - <%= render 'nav' %> -<% end -%> +<%= render 'nav' if next_or_previous?(@blog_post) %> |