Skip to content

Commit

Permalink
Document groups
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Jan 11, 2024
1 parent a1d2937 commit aea25b0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/generators/flipper/templates/initializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## * you have limited gate data combined across all features (< 1k enabled gates, like individual actors, across all features)
##
## For more info, see https://www.flippercloud.io/docs/optimization#preloading
# config.flipper.preload = [:only, :these, :common, :features]
# config.flipper.preload = true

## Warn or raise an error if an unknown feature is checked
## Can be set to `:warn`, `:raise`, or `false`
Expand All @@ -33,3 +33,13 @@
## See http://flippercloud.io/docs/adapters
# config.use Flipper::Adapters::ActiveSupportCacheStore, Rails.cache, expires_in: 5.minutes
end

## Register a group that can be used for enabling features.
##
## Flipper.enable_group :my_feature, :admins
##
## See https://www.flippercloud.io/docs/features#enablement-group
#
# Flipper.register(:admins) do |actor|
# actor.respond_to?(:admin?) && actor.admin?
# end

0 comments on commit aea25b0

Please sign in to comment.