models: require belong_to associations on individual
This commit is contained in:
parent
afb1c33154
commit
fe8804f208
5 changed files with 6 additions and 5 deletions
|
@ -12,7 +12,7 @@
|
|||
# dossier_id :integer
|
||||
#
|
||||
class Individual < ApplicationRecord
|
||||
belongs_to :dossier
|
||||
belongs_to :dossier, optional: false
|
||||
|
||||
validates :dossier_id, uniqueness: true
|
||||
validates :gender, presence: true, allow_nil: false, on: :update
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue