Sha256: db8fdfd2e9c74431259602d1cfbe06348c5e7520d0946f83d76536bf8e4bb4a3

Contents?: true

Size: 993 Bytes

Versions: 2

Compression:

Stored size: 993 Bytes

Contents

<% score = experiment.score %>
<table>
  <caption><%= experiment.conclusion(score).join(" ") %></caption>
  <% score.alts.each do |alt| %>
    <tr class="<%= "choice" if score.choice == alt %>">
      <td class="option"><%= alt.name.gsub(/^o/, "O") %>:</td>
      <td class="value"><code><%= CGI.escape_html alt.value.to_s %></code></td>
      <td>
        <%= "%.1f%%" % [alt.conversion_rate * 100] %>
        <%= "(%d%% better than %s)" % [alt.difference, score.least.name] if alt.difference && alt.difference >= 1 %>
      </td>
      <td class="action">
        <% if experiment.active? && respond_to?(:chooses_experiments_url) %>
          <% if experiment.chosen?(alt) %>
            showing
          <% else %>
            <%= link_to "show", chooses_experiments_url(e: experiment.id, a: alt.id), method: :post,
                  class: "button", title: "Show me this alternative from now on" %>
          <% end %>
        <% end %>
      </td>
    </tr>
  <% end %>
</table>
<%=  %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vanity-0.3.1 lib/vanity/templates/_ab_test.erb
vanity-0.3.0 lib/vanity/templates/_ab_test.erb