models: require belong_to associations on commentaire
This commit is contained in:
parent
32e55a6d37
commit
dd1bed9340
3 changed files with 9 additions and 11 deletions
|
@ -12,7 +12,7 @@
|
|||
# user_id :bigint
|
||||
#
|
||||
class Commentaire < ApplicationRecord
|
||||
belongs_to :dossier, inverse_of: :commentaires, touch: true
|
||||
belongs_to :dossier, inverse_of: :commentaires, touch: true, optional: false
|
||||
|
||||
belongs_to :user, optional: true
|
||||
belongs_to :instructeur, optional: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue