2022-08-17 15:11:57 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Ml
|
|
|
|
class CandidateParam < ApplicationRecord
|
|
|
|
validates :candidate, presence: true
|
2022-09-23 00:10:38 +00:00
|
|
|
validates :name, uniqueness: { scope: :candidate }
|
2022-08-17 15:11:57 +00:00
|
|
|
validates :name, :value, length: { maximum: 250 }, presence: true
|
|
|
|
|
|
|
|
belongs_to :candidate, class_name: 'Ml::Candidate'
|
|
|
|
end
|
|
|
|
end
|