Skip to content

Instantly share code, notes, and snippets.

@electron0zero
Created April 27, 2020 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save electron0zero/16b34e6fd5058042edb6a0520905c77d to your computer and use it in GitHub Desktop.
Save electron0zero/16b34e6fd5058042edb6a0520905c77d to your computer and use it in GitHub Desktop.
Getting things from flipper with Active Recrod backend
# flipper with ActiveRecord backend, taken from
# https://github.com/jnunemaker/flipper/blob/master/examples/active_record/internals.rb
# get all features
ap Flipper::Adapters::ActiveRecord::Feature.all
# get all actors which have a feature enabled
feature_name = "scope_by_tag_group.pg_lookup"
ap Flipper::Adapters::ActiveRecord::Gate.where(feature_key: feature_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment