Sha256: 7b3b938cb4b4391c2cdb1f873f64e1d11879b369b61defb3c8e9dcc35215a1b2
Contents?: true
Size: 1.87 KB
Versions: 16
Compression:
Stored size: 1.87 KB
Contents
<p> <%= link_to root_path do %> « Experiments <% end %> </p> <h1><%= @participant %></h1> <table> <thead> <tr> <th>Experiment</th> <th style="width: 20%;">Variant</th> <th style="width: 20%;">Converted</th> <th style="width: 20%;">Started</th> </tr> </thead> <tbody> <% @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 %> <%= 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 %> </td> <td> <% 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 %> <%= time_ago_in_words(membership.created_at, include_seconds: true) %> ago <% else %> <%= membership.created_at.to_formatted_s(:short) %> <% end %> </td> </tr> <% end %> </tbody> </table>
Version data entries
16 entries across 16 versions & 1 rubygems