<% headers.each do |header| %> <% end %> <% items.each do |item| %> <% table_fields_for_item(item, fields).each_with_index do |field, index| %> <% end %> <% end %>
<%= header %>
<%= field %> <% if index.zero? %>
<%= table_actions(model, item, association_name) %>
<% end %>