models: require belong_to associations on invite
This commit is contained in:
parent
fe8804f208
commit
802d3804f5
2 changed files with 4 additions and 11 deletions
|
@ -14,7 +14,7 @@
|
|||
class Invite < ApplicationRecord
|
||||
include EmailSanitizableConcern
|
||||
|
||||
belongs_to :dossier
|
||||
belongs_to :dossier, optional: false
|
||||
belongs_to :user, optional: true
|
||||
|
||||
before_validation -> { sanitize_email(:email) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue