debian-mirror-gitlab/app/models/ml/candidate_param.rb
2022-11-25 23:54:43 +05:30

11 lines
316 B
Ruby

# frozen_string_literal: true
module Ml
class CandidateParam < ApplicationRecord
validates :candidate, presence: true
validates :name, uniqueness: { scope: :candidate }
validates :name, :value, length: { maximum: 250 }, presence: true
belongs_to :candidate, class_name: 'Ml::Candidate'
end
end