8 lines
344 B
Ruby
8 lines
344 B
Ruby
class Individual < ApplicationRecord
|
|
belongs_to :dossier
|
|
|
|
validates :dossier_id, uniqueness: true
|
|
validates :gender, presence: true, allow_nil: false, on: :update
|
|
validates :nom, presence: true, allow_blank: false, allow_nil: false, on: :update
|
|
validates :prenom, presence: true, allow_blank: false, allow_nil: false, on: :update
|
|
end
|