activescaffold/active_scaffold

View on GitHub
app/views/active_scaffold_overrides/_show_association_horizontal.html.erb

Summary

Maintainability
Test Coverage
<%
  columns_hash = {}
  heading_columns = show_columns_for(associated.first, column, columns_hash)
%>
<table>
  <thead>
    <tr>
<% heading_columns.each_column(skip_groups: true) do |column| -%>
      <th><%= show_label(column) %></th>
<% end -%>
    </tr>
  </thead>
  <tbody>
<% associated.each do |record| -%>
    <%= render :partial => 'show_horizontal_record', :locals => {:record => record, :parent_record => parent_record, :columns => show_columns_for(associated.first, column, columns_hash)} %>
<% end -%>
  </tbody>
</table>