summaryrefslogtreecommitdiff
path: root/app/presenters/environment_presenter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/presenters/environment_presenter.rb')
-rw-r--r--app/presenters/environment_presenter.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/presenters/environment_presenter.rb b/app/presenters/environment_presenter.rb
new file mode 100644
index 00000000000..3fa31eb69a2
--- /dev/null
+++ b/app/presenters/environment_presenter.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class EnvironmentPresenter < Gitlab::View::Presenter::Delegated
+ include ActionView::Helpers::UrlHelper
+
+ presents :environment
+
+ def path
+ if Feature.enabled?(:expose_environment_path_in_alert_details, project)
+ project_environment_path(project, self)
+ end
+ end
+end