Hi, I'm using <%=render :partial =>"comment/post_comment" ,:collection=>@post.comments%> to render all comments of a post, but how do I know inside the partial html if a the entry is even or odd, i.e, I need to have the zebra effect. Thnaks, jp
on 2007-04-03 14:25
on 2007-04-03 14:36
just use the cycle() helper method ex: <li class="<%= cycle("even", "odd") -%>"> ... </li> http://api.rubyonrails.org/classes/ActionView/Help...