Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2018-09-20 22:32:54 +0300
committerMichael Kozono <mkozono@gmail.com>2018-09-24 22:11:26 +0300
commitf107bc69e34f79ea8faaa154caefe56948b8dd68 (patch)
tree60e65bdf6fd939d3d15113fd1f7a53c12038e5dc /lib/gitlab/current_settings.rb
parent45cf64c827270d66a88d483bb3f9043a90301255 (diff)
Simplify by using Gitlab::SafeRequestStore
These are clear wins.
Diffstat (limited to 'lib/gitlab/current_settings.rb')
-rw-r--r--lib/gitlab/current_settings.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index c9dbd2d2e5f..de7c959e706 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -2,11 +2,7 @@ module Gitlab
module CurrentSettings
class << self
def current_application_settings
- if RequestStore.active?
- RequestStore.fetch(:current_application_settings) { ensure_application_settings! }
- else
- ensure_application_settings!
- end
+ Gitlab::SafeRequestStore.fetch(:current_application_settings) { ensure_application_settings! }
end
def fake_application_settings(attributes = {})