<%= link_to root_path do %> « Experiments <% end %>

<%= @participant %>

<% @memberships.each do |membership| %> <% end %>
Experiment Variant Converted Started
<%= link_to membership.experiment, experiment_path(membership.experiment) %> <% experiment = FieldTest::Experiment.find(membership.experiment) rescue nil %> <% if experiment %> <%= form_for membership do |f| %> <%= f.select "variant", options_for_select(FieldTest::Experiment.find(membership.experiment).variants.map { |v| [v, v] }, membership.variant), {}, onchange: "this.form.submit()" %> <% end %> <% else %> <%= membership.variant %> <% end %> <% converted = false %> <% if experiment %> <% experiment.goals.each do |goal| %> <% if @events[[membership.id, goal]] %> <% converted = true %>
<% if experiment.multiple_goals? %> <%= goal.titleize %> <% end %>
<% end %> <% end %> <% end %> <% if !converted && membership.try(:converted) %> <% end %>
<% if membership.created_at > 1.day.ago %> <%= time_ago_in_words(membership.created_at, include_seconds: true) %> ago <% else %> <%= membership.created_at.to_formatted_s(:short) %> <% end %>