summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2018-09-20 12:32:54 -0700
committerMichael Kozono <mkozono@gmail.com>2018-09-24 12:11:26 -0700
commitf107bc69e34f79ea8faaa154caefe56948b8dd68 (patch)
tree60e65bdf6fd939d3d15113fd1f7a53c12038e5dc /app/controllers
parent45cf64c827270d66a88d483bb3f9043a90301255 (diff)
downloadgitlab-ce-f107bc69e34f79ea8faaa154caefe56948b8dd68.tar.gz
Simplify by using Gitlab::SafeRequestStore
These are clear wins.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/concerns/with_performance_bar.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/concerns/with_performance_bar.rb b/app/controllers/concerns/with_performance_bar.rb
index c12839c7bbd..77c3d476ac6 100644
--- a/app/controllers/concerns/with_performance_bar.rb
+++ b/app/controllers/concerns/with_performance_bar.rb
@@ -10,11 +10,7 @@ module WithPerformanceBar
def peek_enabled?
return false unless Gitlab::PerformanceBar.enabled?(current_user)
- if RequestStore.active?
- RequestStore.fetch(:peek_enabled) { cookie_or_default_value }
- else
- cookie_or_default_value
- end
+ Gitlab::SafeRequestStore.fetch(:peek_enabled) { cookie_or_default_value }
end
private