# Using in\_groups\_of to get data to display horizontally

**URL:** <https://www.ruby-forum.com/t/using-in-groups-of-to-get-data-to-display-horizontally/187892>\
**Category:** Rails\
**Created:** [May 1, 2010, 12:19am UTC](https://www.ruby-forum.com/t/using-in-groups-of-to-get-data-to-display-horizontally/187892 "2010-05-01T00:19:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [May 1, 2010, 12:19am UTC](https://www.ruby-forum.com/t/using-in-groups-of-to-get-data-to-display-horizontally/187892/1 "2010-05-01T00:19:15Z")

</div>

Hey all,

The following has two columns. Each column has a head with a name and  
then a data cell with a time directly below it. I’m wondering how I can  
get the time to display next to the name, not below it.

- @clock.in\_groups\_of(2) do |group|  
%tr.header
  - group.each do |item|  
%th= item.name  
%tr
  - group.each do |item|  
%td  
%span.value{“offset” =\> item.zone.now.utc\_offset}  
= item.zone.now.to\_s(:us\_short\_time)

Thanks for any response.
