models: require belong_to associations on attestation
This commit is contained in:
parent
c1e2928ce7
commit
1ea4c2aa36
2 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@
|
|||
# dossier_id :integer not null
|
||||
#
|
||||
class Attestation < ApplicationRecord
|
||||
belongs_to :dossier
|
||||
belongs_to :dossier, optional: false
|
||||
|
||||
has_one_attached :pdf
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FactoryBot.define do
|
||||
factory :attestation do
|
||||
title { 'title' }
|
||||
dossier { create(:dossier) }
|
||||
association :dossier
|
||||
end
|
||||
|
||||
trait :with_pdf do
|
||||
|
|
Loading…
Reference in a new issue