Skip to content

Instantly share code, notes, and snippets.

@thejefflarson
Created November 20, 2010 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thejefflarson/707913 to your computer and use it in GitHub Desktop.
Save thejefflarson/707913 to your computer and use it in GitHub Desktop.
<%- array = [1,2,3,4,5,6,7] %>
<%- grouped = array.in_groups(3) %>
<table>
<% grouped.first.each_with_index do |first_col, index| %>
<tr>
<td><%= first_col %></td>
<td><%= grouped[1][index] %></td>
<td><%= grouped[2][index] %></td>
</tr>
<% end %>
</tabl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment