fatfreecrm/fat_free_crm

View on GitHub
app/views/fields/_group_view.html.haml

Summary

Maintainability
Test Coverage
%table.asset_attributes
  - groups = fields.in_groups_of(2, false)
  - groups.each_with_index do |group, i|
    %tr
      - group.each do |field|
        = col(field.label, (i == groups.size - 1) ? :last : nil) do
          = field.render_value(entity)
        - if group.size == 1
          %th.last
          %td.last