how to stripe rails comments ? I have searched google, but i could not get proper module. Please anyone help me how to do this ?
Regards S.Vellingiri.
how to stripe rails comments ? I have searched google, but i could not get proper module. Please anyone help me how to do this ?
Regards S.Vellingiri.
Well, assuming that you meant to ask: "How can I alternate the visual presentation of elements in a list?"
You can use the cycle() method:
<style type="text/css"> .odd { background-color: #fff; } .even { background-color: #ccc; } </style>
<% @comments.each do |comment| -%> <div class="comment <%= cycle('odd','even') %>"><%= comment %></div> <% end -%>
Please ask a better question next time (and let us know that you at least tried to search Google for it).
-Rob
Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com