Complete API Dossier
This commit is contained in:
parent
a316165792
commit
16c72e7478
7 changed files with 115 additions and 35 deletions
6
app/serializers/cerfa_serializer.rb
Normal file
6
app/serializers/cerfa_serializer.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
class CerfaSerializer < ActiveModel::Serializer
|
||||
|
||||
attributes :content_url => :url
|
||||
|
||||
has_one :type_de_champ
|
||||
end
|
5
app/serializers/champ_serializer.rb
Normal file
5
app/serializers/champ_serializer.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class ChampSerializer < ActiveModel::Serializer
|
||||
attributes :value
|
||||
|
||||
has_one :type_de_champ
|
||||
end
|
|
@ -4,8 +4,12 @@ class DossierSerializer < ActiveModel::Serializer
|
|||
:description,
|
||||
:created_at,
|
||||
:updated_at,
|
||||
:archived
|
||||
:archived,
|
||||
:mandataire_social
|
||||
|
||||
has_one :entreprise
|
||||
has_one :etablissement
|
||||
has_one :cerfa
|
||||
has_many :champs
|
||||
has_many :pieces_justificatives
|
||||
end
|
5
app/serializers/piece_justificative_serializer.rb
Normal file
5
app/serializers/piece_justificative_serializer.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class PieceJustificativeSerializer < ActiveModel::Serializer
|
||||
attributes :content_url => :url
|
||||
|
||||
has_one :type_de_piece_justificative
|
||||
end
|
|
@ -1,7 +1,7 @@
|
|||
class TypeDeChampSerializer < ActiveModel::Serializer
|
||||
attributes :id,
|
||||
:libelle,
|
||||
:type_champ,
|
||||
{:type_champ => :type},
|
||||
:order_place,
|
||||
:description
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue