models: explicitly mark optional belongs_to relationship as so

This prepares making the `belongs_to` relationship required by default.
This commit is contained in:
Pierre de La Morinerie 2020-07-20 14:06:03 +00:00
parent 31dfdbf993
commit 11456109c0
9 changed files with 14 additions and 14 deletions

View file

@ -14,8 +14,8 @@
class Commentaire < ApplicationRecord
belongs_to :dossier, inverse_of: :commentaires, touch: true
belongs_to :user
belongs_to :instructeur
belongs_to :user, optional: true
belongs_to :instructeur, optional: true
validate :messagerie_available?, on: :create