Permalink
Browse files

Add some style hooks for comments listing

  • Loading branch information...
joemsak committed Jul 23, 2010
1 parent 0ce292b commit 5081a8b2a2ae7df8f6ee8c56da5f425d8caf3538
Showing with 4 additions and 2 deletions.
  1. +4 −2 app/views/blogs/_comments.html.erb
@@ -2,8 +2,10 @@
<h2>Comments</h2>
<div id="comments">
<% @blog.comments.approved.each do |comment| %>
- <p><%=h comment.body %></p>
- <p>Comment from <%=h comment.name %>, <%= time_ago_in_words comment.created_at %> ago</p>
+ <% div_for comment, :class => cycle('odd','even') do -%>
+ <p><%=h comment.body %></p>
+ <p class="commented_by">Comment from <%=h comment.name %>, <%= time_ago_in_words comment.created_at %> ago</p>
+ <% end -%>
<% end %>
</div>
<% end %>

0 comments on commit 5081a8b

Please sign in to comment.