Sha256: 57c73b4487789a986bac49566228b5d95f06c3b20750cc58009a974caf1bcad4

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

<% experiments.each do |experiment| %>
  <% results = experiment.results %>

  <h2><%= experiment.name %></h2>
  <table>
    <thead>
      <tr>
        <th>Variant</th>
        <th style="width: 20%;">Participants</th>
        <th style="width: 20%;">Conversions</th>
        <th style="width: 20%;">Conversion Rate</th>
        <th style="width: 20%;">Prob Winning</th>
      </tr>
    </thead>
    <tbody>
      <% results.each do |variant, result| %>
        <tr>
          <td>
            <%= variant %>
            <% if variant == experiment.winner %>
              <span style="color: #999;">winner</span>
            <% end %>
          </td>
          <td><%= result[:participated] %></td>
          <td><%= result[:converted] %></td>
          <td>
            <% if result[:conversion_rate] %>
              <%= (100.0 * result[:conversion_rate]).round %>%
            <% else %>
              -
            <% end %>
          </td>
          <td>
            <% if result[:prob_winning] %>
              <%= (100.0 * result[:prob_winning]).round %>%
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
field_test-0.1.2 app/views/field_test/home/_experiments.html.erb