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:
authorMike Greiling <mike@pixelcog.com>2018-12-20 12:39:09 +0300
committerKushal Pandya <kushalspandya@gmail.com>2018-12-20 12:39:09 +0300
commit9f0983a4b160fac67552b0795f445b08e940ef16 (patch)
treed01b0f29b4255773857e57cba0ad40cc19537676 /app/models/environment.rb
parent70ba4ba2851f42ed1d3a31e4994d89b59c619570 (diff)
Resolve "Hide cluster features that don't work yet with Group Clusters"
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r--app/models/environment.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb
index 934828946b9..cdfe3b7c023 100644
--- a/app/models/environment.rb
+++ b/app/models/environment.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
class Environment < ActiveRecord::Base
+ include Gitlab::Utils::StrongMemoize
# Used to generate random suffixes for the slug
LETTERS = 'a'..'z'
NUMBERS = '0'..'9'
@@ -231,7 +232,9 @@ class Environment < ActiveRecord::Base
end
def deployment_platform
- project.deployment_platform(environment: self.name)
+ strong_memoize(:deployment_platform) do
+ project.deployment_platform(environment: self.name)
+ end
end
private