diff options
Diffstat (limited to 'app/presenters/deployments/deployment_presenter.rb')
-rw-r--r-- | app/presenters/deployments/deployment_presenter.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/presenters/deployments/deployment_presenter.rb b/app/presenters/deployments/deployment_presenter.rb new file mode 100644 index 00000000000..5ef6fcff974 --- /dev/null +++ b/app/presenters/deployments/deployment_presenter.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Deployments + class DeploymentPresenter < Gitlab::View::Presenter::Delegated + presents ::Deployment, as: :deployment + + delegator_override :tags + def tags + super.map do |tag| + { + name: tag, + path: "tags/#{tag}" + } + end + end + end +end |