summaryrefslogtreecommitdiff
path: root/app/models/environment.rb
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-05-03 00:07:45 +1200
committerThong Kuah <tkuah@gitlab.com>2019-05-20 14:04:16 +1200
commit0398213d207fcc03cdb3f8dfd02a61f207a8eea9 (patch)
tree03635671c2f8ef2fbb3bf3c6f1d730eaa2cfc580 /app/models/environment.rb
parenta4777d6ea91433a134358de8ca446d96a2e5fd6f (diff)
downloadgitlab-ce-0398213d207fcc03cdb3f8dfd02a61f207a8eea9.tar.gz
Use Environment#deployment_platform method insteadenvironment_terminal_methods
As this method does have `deployment_platform(environment: self.name)`, which is what the form EE needs. Allows us to remove two overrides in EE.
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r--app/models/environment.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb
index 0eda7a2513f..aff20dae09b 100644
--- a/app/models/environment.rb
+++ b/app/models/environment.rb
@@ -155,11 +155,11 @@ class Environment < ApplicationRecord
end
def has_terminals?
- project.deployment_platform.present? && available? && last_deployment.present?
+ deployment_platform.present? && available? && last_deployment.present?
end
def terminals
- project.deployment_platform.terminals(self) if has_terminals?
+ deployment_platform.terminals(self) if has_terminals?
end
def has_metrics?