demarches-normaliennes/app/serializers/procedure_serializer.rb
2017-07-11 15:03:35 +02:00

17 lines
561 B
Ruby

class ProcedureSerializer < ActiveModel::Serializer
attribute :libelle, key: :label
attribute :lien_demarche, key: :link
attributes :id,
:description,
:organisation,
:direction,
:archived_at,
: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