lib/data-table/table.rb in data-table-2.0.1 vs lib/data-table/table.rb in data-table-2.0.2
- old
+ new
@@ -266,9 +266,11 @@
end
def render_parent_subtotals(group_array)
html = ''
@parent_subtotals[group_array].each_with_index do |group, index|
+ next if group.nil?
+
html << "<tr class='parent_subtotal "
html << "index_#{index} #{group_array.join('_').gsub(/\s/, '_').downcase}'>"
@columns.each do |col|
value = group[col.name] ? group[col.name].values[0] : nil
html << col.render_cell(value)