demarches-normaliennes/app/serializers/champs/siret_champ_serializer.rb
2018-10-22 23:28:00 +02:00

12 lines
217 B
Ruby

class Champs::SiretChampSerializer < ChampSerializer
has_one :etablissement
has_one :entreprise
def etablissement
object.etablissement
end
def entreprise
object.etablissement&.entreprise
end
end