<%= form_with(model: container, url:, scope:, **html_attributes) do %> <%# Hidden input ensures that if the container is empty then the controller receives an empty array. %> <%= render errors %> <%= render Katalyst::Content::Editor::TableComponent.new(container:) do |list| %> <%= container.draft_items.each { |item| list.with_item(item) } %> <% end %> <% end %>