<%= tag.table table.html_attributes do %> <% table.columns.each do |column| %> <%= column.name %> <% end %> <% table.items.each do |item| %> <%= tag.tr table.row_attributes(item) do %> <% table.columns.each do |column| %> <%= tag.td column.html_attributes do %> <%= column.value(item) %> <% end %> <% end %> <% end %> <% end %> <% end %>