Sha256: 9dbf799cd84ab2fcf13677841cec39c6081bcaf8ca5f3ca9ad269ce2eb29aab4

Contents?: true

Size: 1005 Bytes

Versions: 7

Compression:

Stored size: 1005 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><%=h 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?(:url_for) %>
          <% if experiment.showing?(alt) %>
            showing
          <% else %>
            <a class="button chooses" title="Show me this alternative from now on" href="#"
              data-id="<%= experiment.id %>" data-url="<%= url_for(:action=>:chooses, :e=>experiment.id, :a=>alt.id) %>">show</a>
          <% end %>
        <% end %>
      </td>
    </tr>
  <% end %>
</table>
<%=  %>

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
vanity-1.4.0 lib/vanity/templates/_ab_test.erb
vanity-1.4.0.beta lib/vanity/templates/_ab_test.erb
vanity-1.3.0 lib/vanity/templates/_ab_test.erb
mikeg-vanity-1.3.0 lib/vanity/templates/_ab_test.erb
vanity-1.2.0 lib/vanity/templates/_ab_test.erb
vanity-1.1.1 lib/vanity/templates/_ab_test.erb
vanity-1.1.0 lib/vanity/templates/_ab_test.erb