aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog/shared/_post.html.erb
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2011-03-11 14:23:44 -0600
committerJoe Sak <joe@joesak.com>2011-03-11 14:23:44 -0600
commit3748c1d9efabde0b62db7b92281c711c6411cfce (patch)
tree82f494d8cea40c009a70050c1a99491e58385612 /app/views/blog/shared/_post.html.erb
parentb3f95341c3b67123084563bd38f9145b8ef4da78 (diff)
downloadrefinerycms-blog-3748c1d9efabde0b62db7b92281c711c6411cfce.tar.gz
refinerycms-blog-3748c1d9efabde0b62db7b92281c711c6411cfce.tar.bz2
refinerycms-blog-3748c1d9efabde0b62db7b92281c711c6411cfce.zip
Closes GH-29. Blog posts act as taggable. rspec & cukes passing
Diffstat (limited to 'app/views/blog/shared/_post.html.erb')
-rw-r--r--app/views/blog/shared/_post.html.erb10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/views/blog/shared/_post.html.erb b/app/views/blog/shared/_post.html.erb
index 2e92f73..716c1ad 100644
--- a/app/views/blog/shared/_post.html.erb
+++ b/app/views/blog/shared/_post.html.erb
@@ -9,9 +9,13 @@
<% if (categories = post.categories).any? %>
<aside class='filed_in'>
<%= t('filed_in', :scope => 'blog.posts.show') %>
- <% categories.each_with_index do |category, index| %>
- <%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
- <% end %>
+ <%=raw categories.collect { |category| link_to category.title, blog_category_url(category) }.to_sentence %>
+ </aside>
+ <% end %>
+ <% if (tags = post.tag_list).any? %>
+ <aside class='tagged'>
+ <%= t('tagged', :scope => 'blog.posts.show') %>
+ <%=raw tags.collect { |tag| link_to tag, tagged_posts_path(tag.parameterize) }.to_sentence %>
</aside>
<% end %>
</details>