From 9dbbb093a19f3e819c305fce395347fb780aa055 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Tue, 9 Feb 2021 18:34:21 +0100 Subject: [PATCH] validation factures --- app/models/m_odr_file.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/m_odr_file.rb b/app/models/m_odr_file.rb index 039a88a..3b6ca0d 100644 --- a/app/models/m_odr_file.rb +++ b/app/models/m_odr_file.rb @@ -12,6 +12,8 @@ class MOdrFile < ApplicationRecord has_many :m_odr_file_products, :dependent => :destroy accepts_nested_attributes_for :m_odr_file_products, :allow_destroy => true + validates_associated :m_odr_file_products + has_many :m_odr_file_roulages, :dependent => :destroy accepts_nested_attributes_for :m_odr_file_roulages, :allow_destroy => true