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

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

module Projects
  module Ml
    class CandidatesController < ApplicationController
      before_action :check_feature_flag

      feature_category :mlops

      def show
        @candidate = ::Ml::Candidate.with_project_id_and_iid(@project.id, params['iid'])

        render_404 unless @candidate.present?
      end

      private

      def check_feature_flag
        render_404 unless Feature.enabled?(:ml_experiment_tracking, @project)
      end
    end
  end
end