add module api carto in api procedure

This commit is contained in:
Tanguy PATTE 2016-01-12 15:11:42 +01:00
parent 3ea381413f
commit c04627431c
4 changed files with 29 additions and 6 deletions

View file

@ -1,11 +1,16 @@
class ProcedureSerializer < ActiveModel::Serializer
attribute :libelle, key: :label
attribute :lien_demarche, key: :link
attributes :id,
:libelle,
:description,
:organisation,
:direction,
:lien_demarche,
:archived
:archived,
:geographic_information
has_one :geographic_information, serializer: ModuleApiCartoSerializer
has_many :types_de_champ, serializer: TypeDeChampSerializer
has_many :types_de_piece_justificative, serializer: TypeDePieceJustificativeSerializer
end