Forum: Ruby on Rails render :partial

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
J. m. (Guest)
on 2007-04-03 16:25

I'm using
<%=render :partial =>"comment/post_comment"

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


Chris H. (Guest)
on 2007-04-03 16:36
(Received via mailing list)
just use the cycle() helper method


<li class="<%= cycle("even", "odd") -%>"> ... </li>
This topic is locked and can not be replied to.