Welcome to mirror list, hosted at ThFree Co, Russian Federation.

candidate_presenter.rb « ml « presenters « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2465238d81e2c0c85f9927eee39118b871c797a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

module Ml
  class CandidatePresenter < Gitlab::View::Presenter::Delegated
    presents ::Ml::Candidate, as: :candidate

    def path
      project_ml_candidate_path(
        candidate.project,
        candidate.iid
      )
    end

    def artifact_path
      return unless candidate.package_id.present?

      project_package_path(candidate.project, candidate.package_id)
    end
  end
end