Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percentage Rollout on rails view #126

Open
kirykr opened this issue Aug 18, 2017 · 2 comments
Open

Percentage Rollout on rails view #126

kirykr opened this issue Aug 18, 2017 · 2 comments

Comments

@kirykr
Copy link

kirykr commented Aug 18, 2017

I have tried to limit users by 20 percent but seemed all the users can see the view that I blocked

- if $rollout.active? :percentage_rollout, current_user
    %h2
      Hello
      =current_user.first_name

my initial instance

    $name_space = Redis::Namespace.new(Rails.env, redis: $redis)
    $rollout = Rollout.new($name_space)
    $rollout.define_group(:percetage_users) do |user|
      user
    end
    $rollout.activate_users(:percentage_rollout, User.all)
    $rollout.deactivate_group(:percentage_rollout, :percentage_users)

    $rollout.activate_percentage :percentage_rollout, 20

please correct me if what i did wrong here?, thanks

@p-salido
Copy link

p-salido commented Oct 12, 2017

@kirykr $rollout.activate_users(:percentage_rollout, User.all) activates for all users, subsequent group/percentage activations and deactivations don't matter. See #87.

@Bertg
Copy link

Bertg commented Jul 19, 2018

This issue seems to have a solution. Suggest to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants