Using in_groups_of to get data to display horizontally

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs