%a{:name => "weight_history"} %h2 Experiment Weight History - @weight_history.group_by(&:group_name).each do |group_name, group| .group %fieldset %legend= group_name .chart= image_tag weight_history(group_name, group) .toggle_table (table) %table %tr %th Date %th Alternative %th Weight - group.sort_by(&:computed_at).reverse.each do |row| %tr %td.date = row.computed_at - if row.launch_window = "(#{row.launch_window} day(s) till hard launch)" %td.name= row.alternative %td.weight= row.weight