In every for loop in my application I do something like this
<% odd_or_even = 0 for event in @events odd_or_even = 1 - odd_or_even %>
other solutions. But we support a large number of browsers and can’t be
everyone has the latest browser so we have settled with this solution.
I was wondering if there is a way for me to open the for loop
functionaliyty and add this feature
- Every time the for loop starts initialize odd_or_even to zero.
- Change the value everytime the loop is executed.
- Make this varialbe odd_or_even visible exactly the way event is