summaryrefslogtreecommitdiff
path: root/lib/feature.rb
diff options
context:
space:
mode:
authorIgor <idrozdov@gitlab.com>2019-08-05 15:06:02 +0000
committerIgor <idrozdov@gitlab.com>2019-08-05 15:06:02 +0000
commit7efb062c3c3c7b44113d0dc0fe78fc9b8e95bd7c (patch)
treea12bde9bbeffcc0c365d3a29339d0389dcefdd8f /lib/feature.rb
parent2bd1320f86b8cfd5d60199c5f7f0caa1cc2aa66b (diff)
parent3dfc89ade452ad7f0185653b30ed1d4bb2544fb0 (diff)
downloadgitlab-ce-id-test-codeowners.tar.gz
Merge branch 'master' into 'id-test-codeowners'id-test-codeowners
# Conflicts: # .gitlab/CODEOWNERS
Diffstat (limited to 'lib/feature.rb')
-rw-r--r--lib/feature.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/feature.rb b/lib/feature.rb
index e28333aa58e..c70a6980f19 100644
--- a/lib/feature.rb
+++ b/lib/feature.rb
@@ -80,6 +80,13 @@ class Feature
get(key).disable_group(group)
end
+ def remove(key)
+ feature = get(key)
+ return unless persisted?(feature)
+
+ feature.remove
+ end
+
def flipper
if Gitlab::SafeRequestStore.active?
Gitlab::SafeRequestStore[:flipper] ||= build_flipper_instance