Add Siret(TypeDe)Champ STI model

This commit is contained in:
Paul Chavard 2018-04-03 16:29:42 +02:00
parent 3cd80af6cb
commit 0b79a3d79d
4 changed files with 10 additions and 0 deletions

View 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

View file

@ -0,0 +1,2 @@
class TypesDeChamp::SiretTypeDeChamp < TypeDeChamp
end

View file

@ -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'

View file

@ -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