<%= tag.table **table.table_attributes do %> <% table.columns.each do |column| %> <%= tag.th **column.header_attributes do %> <%= column.name %> <% end %> <% end %> <% table.items.each_with_index do |item, i| %> <%= tag.tr **table.all_row_attributes(item, i) do %> <% table.columns.each_with_index do |column, j| %> <%= tag.td **column.body_attributes do %> <%= column.value(item, i, j) %> <% end %> <% end %> <% end %> <% end %> <% end %>