Skip to content

Instantly share code, notes, and snippets.

@steve0hh
Last active December 23, 2015 15:39
Show Gist options
  • Save steve0hh/6656988 to your computer and use it in GitHub Desktop.
Save steve0hh/6656988 to your computer and use it in GitHub Desktop.
table snippet that displays data in tables horizontally
<table class="table table-bordered">
<thead>
<tr>
<th colspan="6"><%= @itinerary.name %></th>
</tr>
</thead>
<tbody>
<% @itinerary.timings.in_groups_of(6) do |timings_row| %>
<tr>
<% timings_row.each do |timing| %>
<td>
<% unless timing.nil? %>
<%= timing.start_time_text %>
<% end %>
</td>
<% end %>
</tr>
<% end %>
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment