demarches-normaliennes/app/serializers/procedure_serializer.rb
2016-08-02 16:13:15 +02:00

18 lines
613 B
Ruby

class ProcedureSerializer < ActiveModel::Serializer
attribute :libelle, key: :label
attribute :lien_demarche, key: :link
attributes :id,
:description,
:organisation,
:direction,
:archived,
:geographic_information,
:total_dossier
has_one :geographic_information, serializer: ModuleApiCartoSerializer
has_many :types_de_champ, serializer: TypeDeChampSerializer
has_many :types_de_champ_private, serializer: TypeDeChampSerializer
has_many :types_de_piece_justificative, serializer: TypeDePieceJustificativeSerializer
end