<% if params.key?("error") %>
<%= params["error"] %>
<% end %>

<%= @feature.key %>

<% if @feature.on? %> The feature is enabled for everyone. Disable this feature with one click. <% else %> Enable or disable this feature for everyone with one click. <% end %>

<%== csrf_input_tag %> <% unless @feature.on? %> <% end %>

Percentage of Actors

<%== csrf_input_tag %>
<% @percentages.each do |number| %> disabled<% end %>> <% end %>

- or -

<%== csrf_input_tag %> 0 %>value="<%= @feature.percentage_of_actors_value %>"<% end %> placeholder="custom (ie: 26, 32, etc.)" class="input-mini">

Percentage of actors functions independently of percentage of time. If you enable 50% of Actors and 25% of Time then the feature will always be enabled for 50% of users and occasionally enabled 25% of the time for everyone.

Percentage of Time

<%== csrf_input_tag %>
<% @percentages.each do |number| %> disabled<% end %>> <% end %>

- or -

<%== csrf_input_tag %> 0 %>value="<%= @feature.percentage_of_time_value %>"<% end %> placeholder="custom (ie: 26, 32, etc.)" class="input-mini">

Percentage of time functions independently of percentage of actors. If you enable 50% of Actors and 25% of Time then the feature will always be enabled for 50% of users and occasionally enabled 25% of the time for everyone.

<% if @feature.disabled_groups.empty? %>

All groups enabled.

<% else %>
<%== csrf_input_tag %>
<% end %>

Groups

<% if @feature.groups_value.empty? %>

No Enabled Groups

Enable groups using the form above.

<% else %>
    <% @feature.groups_value.each do |item| %>
  • <%= item %>
    <%== csrf_input_tag %>
  • <% end %>
<% end %>
<%== csrf_input_tag %>

Actors

<% if @feature.actors_value.empty? %>

No Enabled Actors

Enable actors using the form above.

<% else %>
    <% @feature.actors_value.each do |item| %>
  • <%= item %>
    <%== csrf_input_tag %>
  • <% end %>
<% end %>

Danger Zone

Deleting a feature removes it from the list of features and disables it for everyone.

<%== csrf_input_tag %>