Files
growstuff/app/views/posts/_summary.html.haml
2014-07-13 18:37:33 -04:00

21 lines
586 B
Plaintext

- howmany ||= 100
- if posts.length > 0
%table.table.table-striped
%tr
%th Subject
%th.hidden-xs Posted by
%th Most recent activity
%th.hidden-xs Comments
- posts.recently_active[0..howmany-1].each do |post|
%tr
%td
= link_to truncate(strip_tags(post.subject), :length => 40, :separator => ' '), post
%td.hidden-xs
=link_to post.author, post.author
%td
= distance_of_time_in_words(post.recent_activity, Time.zone.now)
ago
%td.hidden-xs
= post.comments.count.to_s