diff --git a/app/helpers/body_trackers_helper.rb b/app/helpers/body_trackers_helper.rb index 39158e7..ad5bba8 100644 --- a/app/helpers/body_trackers_helper.rb +++ b/app/helpers/body_trackers_helper.rb @@ -59,7 +59,8 @@ module BodyTrackersHelper # * int > 0 - quantity name-labelled cell with 'int' size colspan # * int < 0 - quantity name-labelled cell with 'int' size rowspan # * 0 - non-labelled cell without col-/rowspan - spec = [] + spec = [Hash.new(0)] + return spec if quantities.empty? default_row = Hash.new(0) # Determine colspans first... diff --git a/app/views/measurements/_readouts.html.erb b/app/views/measurements/_readouts.html.erb index 543435a..8c74fa9 100644 --- a/app/views/measurements/_readouts.html.erb +++ b/app/views/measurements/_readouts.html.erb @@ -63,7 +63,7 @@ - <% next unless @quantities.length > 0 %> + <% next if @quantities.empty? %> <% extra_quantities.each_slice(@quantities.length) do |eqs| %>
<%= targets.delete(q) %>
<% end %> -