demarches-normaliennes/app/serializers/procedure_serializer.rb

17 lines
516 B
Ruby
Raw Normal View History

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,
:description,
:organisation,
:direction,
2016-01-12 15:11:42 +01:00
:archived,
:geographic_information
has_one :geographic_information, serializer: ModuleApiCartoSerializer
2015-12-21 17:51:49 +01:00
has_many :types_de_champ, serializer: TypeDeChampSerializer
has_many :types_de_piece_justificative, serializer: TypeDePieceJustificativeSerializer
end