app/views/field_test/participants/show.html.erb in field_test-0.2.0 vs app/views/field_test/participants/show.html.erb in field_test-0.2.1

- old
+ new

@@ -14,11 +14,11 @@ <th style="width: 20%;">Converted</th> <th style="width: 20%;">Started</th> </tr> </thead> <tbody> - <% FieldTest::Membership.where(participant: @participant).each do |membership| %> + <% @memberships.each do |membership| %> <tr> <td><%= link_to membership.experiment, experiment_path(membership.experiment) %></td> <td> <% experiment = FieldTest::Experiment.find(membership.experiment) rescue nil %> <% if experiment %> @@ -28,10 +28,25 @@ <% else %> <%= membership.variant %> <% end %> </td> <td> - <% if membership.converted %> + <% converted = false %> + <% if experiment %> + <% experiment.goals.each do |goal| %> + <% if @events[[membership.id, goal]] %> + <% converted = true %> + <div> + <span class="check">✓</span> + <% if experiment.multiple_goals? %> + <%= goal.titleize %> + <% end %> + </div> + <% end %> + <% end %> + <% end %> + + <% if !converted && membership.try(:converted) %> <span class="check">✓</span> <% end %> </td> <td> <% if membership.created_at > 1.day.ago %>