Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<%- array = [1,2,3,4,5,6,7] %>
<%- grouped = array.in_groups(3) %>
<% grouped.first.each_with_index do |first_col, index| %>
<td><%= first_col %></td>
<td><%= grouped[1][index] %></td>
<td><%= grouped[2][index] %></td>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.