<thead>
  <tr>
    <%
    active_scaffold_config_for(@record.class).subform.columns.each :for => @record, :flatten => true do |column|
      next unless in_subform?(column, parent_record)
      -%>
      <th><%= column.label %></th>
    <% end -%>
  </tr>
</thead>
<thead>
  <tr>
    <%
    active_scaffold_config_for(@record.class).subform.columns.each :for => @record, :flatten => true do |column|
      next unless in_subform?(column, parent_record) and column_renders_as(column) != :hidden
      -%>
      <th><%= column.label %></th>
    <% end -%>
  </tr>
</thead>
Hide hidden column header labels - like lock_version - in sub-forms.
Hide hidden column header labels  - like lock_version - in sub-forms.