Clarify dependent relationships between etablissement and entreprise
This commit is contained in:
parent
d5f620a163
commit
19b58a298c
3 changed files with 2 additions and 3 deletions
|
@ -181,7 +181,6 @@ class Dossier < ApplicationRecord
|
|||
|
||||
def reset!
|
||||
etablissement.destroy
|
||||
entreprise.destroy
|
||||
|
||||
update_columns(autorisation_donnees: false)
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class Entreprise < ApplicationRecord
|
||||
belongs_to :dossier
|
||||
has_one :etablissement, dependent: :destroy
|
||||
has_one :etablissement
|
||||
has_one :rna_information, dependent: :destroy
|
||||
|
||||
validates :siren, presence: true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class Etablissement < ApplicationRecord
|
||||
belongs_to :dossier
|
||||
belongs_to :entreprise
|
||||
belongs_to :entreprise, dependent: :destroy
|
||||
|
||||
has_many :exercices, dependent: :destroy
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue