summaryrefslogtreecommitdiff
path: root/lib/feature.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-10-05 11:20:19 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-10-05 11:20:19 -0300
commit75ddf0d48d0fee6f9209376b0751d414946f9c67 (patch)
tree8cdb01f9b7da38c98eb0cf13f406295d9465b7bc /lib/feature.rb
parent88fa9a3c31d250ae9b88bb3250204b39eabc14b4 (diff)
downloadgitlab-ce-75ddf0d48d0fee6f9209376b0751d414946f9c67.tar.gz
Refactor Feature.flipper method
Diffstat (limited to 'lib/feature.rb')
-rw-r--r--lib/feature.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/feature.rb b/lib/feature.rb
index 0e90ad9a333..a8324d99c10 100644
--- a/lib/feature.rb
+++ b/lib/feature.rb
@@ -72,7 +72,11 @@ class Feature
end
def flipper
- @flipper ||= (Gitlab::SafeRequestStore[:flipper] ||= build_flipper_instance)
+ if Gitlab::SafeRequestStore.active?
+ Gitlab::SafeRequestStore[:flipper] ||= build_flipper_instance
+ else
+ @flipper ||= build_flipper_instance
+ end
end
def build_flipper_instance