开发者

Change back color of every row of a table in ruby on rails

I want to change the backcolor of every rows of a table but I am not quite sure what is the best way to do it. Personally, I want to change on backcolor with ruby codes,but i dont know how :(

here is my code:

<% @word.each do |w| %>
                <% i=0 %>
                <% i=i+1 %>
                <% if i % 2==0 %>
 ........

Thank you for your helps

Ba开发者_StackOverflow中文版bak


Use cycle it's exactly what you need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜