debian-mirror-gitlab/app/controllers/projects/ml/candidates_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
498 B
Ruby
Raw Normal View History

2023-03-04 22:38:38 +05:30
# 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