models: require belong_to associations on exercice
This commit is contained in:
parent
51d392a1dc
commit
79fcf5e814
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@
|
|||
# etablissement_id :integer
|
||||
#
|
||||
class Exercice < ApplicationRecord
|
||||
belongs_to :etablissement
|
||||
belongs_to :etablissement, optional: false
|
||||
|
||||
validates :ca, presence: true, allow_blank: false, allow_nil: false
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue