1

This is basically what I'm trying to do, but I was wondering if there was a way to do it with out running the loop twice?

%table
  %thead
    %tr
      - @widgets.each do |widget|
        %th
          = widget.name
  %tbody
    %tr
      - @widgets.each do |widget|
        %td
          = widget.info
4

1 に答える 1