Last active
January 28, 2019 14:08
-
-
Save jeffandersen/ae32a98e93abd5fcab24a7c0cb1e7327 to your computer and use it in GitHub Desktop.
Using Prefab.cloud feature flags for cohort release of a new feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client = Prefab::Client.new(api_key: "ACCT_ID|APIKEY") | |
@feature_flags = client.feature_flag_client | |
## | |
# Where usr is defined as | |
# usr = {id: 456, attributes: ["beta"]} | |
if @feature_flags.feature_is_on_for? "templates", "user:" + usr[:id], attributes: usr[:attributes]} | |
## Execute the templates feature logic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment