Skip to content

Instantly share code, notes, and snippets.

@jeffandersen jeffandersen/templates.rb
Last active Jan 28, 2019

Embed
What would you like to do?
Using Prefab.cloud feature flags for cohort release of a new feature
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
You can’t perform that action at this time.