Sha256: 7d91c0f81b66d4a65c1fc98398a6eadb43b6156a5e4205fba1d3e35363dcb738

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>Name</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.1 app/views/field_test/home/_experiments.html.erb