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

Allow changing of actor or percentage gates in active_record adapter #122

Merged

Conversation

vegantech
Copy link
Contributor

Choosing a second (or additional) percentage creates an additional row in the feature_gates table. The one that is used is arbitrary, typically the first one created.

Additionally, if a user chooses a percentage for a feature that was previously chosen, this will create an exception.

The fix should work in rails 3.2 and 4.x.

@jnunemaker
Copy link
Collaborator

Well that is less than ideal. :( Thanks for the patch. I suspect that disable suffers the same problem. I can fix that up after I merge this.

@jnunemaker jnunemaker merged commit 4a14bde into flippercloud:master May 12, 2016
jnunemaker added a commit that referenced this pull request May 12, 2016
refs #122. This takes a bit different approach. Instead of first or
initialize by which could race we use a transaction to delete all and
create. Instead of still possibly ending up with dups this approach
should mean we just let last write win. I think…
@jnunemaker
Copy link
Collaborator

I tweaked your approach a bit #124. Can't believe I missed that. Thanks for finding and sorry for any pain it caused you and the lost time tracking it down. :)

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

Successfully merging this pull request may close these issues.

2 participants