Add Siret(TypeDe)Champ STI model
This commit is contained in:
parent
3cd80af6cb
commit
0b79a3d79d
4 changed files with 10 additions and 0 deletions
4
app/models/champs/siret_champ.rb
Normal file
4
app/models/champs/siret_champ.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
class Champs::SiretChamp < Champ
|
||||
belongs_to :etablissement, dependent: :destroy
|
||||
accepts_nested_attributes_for :etablissement, allow_destroy: true, update_only: true
|
||||
end
|
2
app/models/types_de_champ/siret_type_de_champ.rb
Normal file
2
app/models/types_de_champ/siret_type_de_champ.rb
Normal file
|
@ -0,0 +1,2 @@
|
|||
class TypesDeChamp::SiretTypeDeChamp < TypeDeChamp
|
||||
end
|
|
@ -26,3 +26,4 @@ fr:
|
|||
multiple_drop_down_list: 'Menu déroulant à choix multiples'
|
||||
dossier_link: 'Lien vers un autre dossier'
|
||||
piece_justificative: 'Pièce justificative'
|
||||
siret: 'SIRET'
|
||||
|
|
|
@ -75,6 +75,9 @@ FactoryBot.define do
|
|||
factory :type_de_champ_piece_justificative, class: 'TypesDeChamp::PieceJustificativeTypeDeChamp' do
|
||||
type_champ 'piece_justificative'
|
||||
end
|
||||
factory :type_de_champ_siret, class: 'TypesDeChamp::SiretTypeDeChamp' do
|
||||
type_champ 'siret'
|
||||
end
|
||||
|
||||
trait :private do
|
||||
private true
|
||||
|
|
Loading…
Reference in a new issue