models: require belong_to associations on avis
This commit is contained in:
parent
aefdd5d2a1
commit
32e55a6d37
3 changed files with 8 additions and 3 deletions
|
@ -17,9 +17,9 @@
|
|||
class Avis < ApplicationRecord
|
||||
include EmailSanitizableConcern
|
||||
|
||||
belongs_to :dossier, inverse_of: :avis, touch: true
|
||||
belongs_to :dossier, inverse_of: :avis, touch: true, optional: false
|
||||
belongs_to :instructeur, optional: true
|
||||
belongs_to :claimant, class_name: 'Instructeur'
|
||||
belongs_to :claimant, class_name: 'Instructeur', optional: false
|
||||
|
||||
has_one_attached :piece_justificative_file
|
||||
has_one_attached :introduction_file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue