models: require belong_to associations on assign_to

This commit is contained in:
Pierre de La Morinerie 2020-07-20 14:13:51 +00:00
parent 11456109c0
commit c1e2928ce7
7 changed files with 25 additions and 25 deletions

View file

@ -14,8 +14,8 @@
# procedure_id :integer
#
class AssignTo < ApplicationRecord
belongs_to :instructeur
belongs_to :groupe_instructeur
belongs_to :instructeur, optional: false
belongs_to :groupe_instructeur, optional: false
has_one :procedure_presentation, dependent: :destroy
has_one :procedure, through: :groupe_instructeur