Re-add Feature.register_feature_groups which is already documented

This is a follow-up for !12362 where this was documented but the code
was removed in the last iteration. Since this can still be useful and
this is already supported by the API, I think re-adding the code was
the best course of action.

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2017-07-10 15:54:49 +02:00
parent cd735170d3
commit a7d65aeaf2
No known key found for this signature in database
GPG Key ID: 46DF07E5CD9E96AB
2 changed files with 8 additions and 0 deletions

View File

@ -3,4 +3,6 @@ require 'flipper/middleware/memoizer'
unless Rails.env.test?
Rails.application.config.middleware.use Flipper::Middleware::Memoizer,
lambda { Feature.flipper }
Feature.register_feature_groups
end

View File

@ -57,5 +57,11 @@ class Feature
Flipper.new(adapter)
end
end
# This method is called from config/initializers/flipper.rb and can be used
# to register Flipper groups.
# See https://docs.gitlab.com/ee/development/feature_flags.html#feature-groups
def register_feature_groups
end
end
end