demarches-normaliennes/app/models/individual.rb
2018-04-04 15:27:30 +02:00

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