I have the following code (simplified to get to the point):
- @assumptions[1].each do |ca| - if count % 3 == 1 %tr %th = ca.value - else %th = ca.value - count = count + 1
I'm not sure how to make this work in haml so that every 4 elements create a new tag.
Here is how it outputs:
<tr> <tr> <th> 700.0 </th> </tr> <th> 1235.0 </th> <th> 0.8 </th> <th> 650.0 </th> <tr> <th> 1050.0 </th> </tr> <th> 0.2 </th> </tr>
This is how I would like to output it:
<tr> <th> 700.0 </th> <th> 1235.0 </th> <th> 0.8 </th> </tr> <tr> <th> 650.0 </th> <th> 1050.0 </th> </tr>
Hope this makes sense.
source share