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:
authorFilipa Lacerda <filipa@gitlab.com>2016-12-07 18:27:22 +0300
committerFilipa Lacerda <filipa@gitlab.com>2016-12-07 18:43:24 +0300
commit4eb53036c7469d027d2a75aff9e70950557195d2 (patch)
treeacfe7f47c3a9f0323e1d1fbc13a9d36f7191d932 /app/helpers/environment_helper.rb
parent2dc907bc1761499e27c0a75eeccbbd350b38f80e (diff)
Changes after review
Diffstat (limited to 'app/helpers/environment_helper.rb')
-rw-r--r--app/helpers/environment_helper.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/helpers/environment_helper.rb b/app/helpers/environment_helper.rb
index 96d6f64eb8e..ff8550439d0 100644
--- a/app/helpers/environment_helper.rb
+++ b/app/helpers/environment_helper.rb
@@ -14,14 +14,12 @@ module EnvironmentHelper
end
end
- def deployment_link(deployment, text)
+ def deployment_link(deployment, text: nil)
return unless deployment
- if text
- link_to text, [deployment.project.namespace.becomes(Namespace), deployment.project, deployment.deployable]
- else
- link_to "##{deployment.iid}", [deployment.project.namespace.becomes(Namespace), deployment.project, deployment.deployable]
- end
+ link_label = text ? text : "##{deployment.iid}"
+
+ link_to link_label, [deployment.project.namespace.becomes(Namespace), deployment.project, deployment.deployable]
end
def last_deployment_link_for_environment_build(project, build)