2015-12-21 17:51:49 +01:00
|
|
|
class ProcedureSerializer < ActiveModel::Serializer
|
2016-01-12 15:11:42 +01:00
|
|
|
attribute :libelle, key: :label
|
|
|
|
attribute :lien_demarche, key: :link
|
|
|
|
|
2015-12-21 17:51:49 +01:00
|
|
|
attributes :id,
|
2017-06-12 13:49:51 +02:00
|
|
|
:description,
|
|
|
|
:organisation,
|
|
|
|
:direction,
|
2017-07-10 23:42:33 +02:00
|
|
|
:archived_at,
|
2017-06-12 13:49:51 +02:00
|
|
|
:geographic_information,
|
|
|
|
:total_dossier
|
2016-01-12 15:11:42 +01:00
|
|
|
|
|
|
|
has_one :geographic_information, serializer: ModuleApiCartoSerializer
|
2016-08-02 16:13:15 +02:00
|
|
|
has_many :types_de_champ, serializer: TypeDeChampSerializer
|
|
|
|
has_many :types_de_champ_private, serializer: TypeDeChampSerializer
|
|
|
|
has_many :types_de_piece_justificative, serializer: TypeDePieceJustificativeSerializer
|
2015-12-21 17:51:49 +01:00
|
|
|
end
|