demarches-normaliennes/app/serializers/champs/siret_champ_serializer.rb

13 lines
217 B
Ruby
Raw Normal View History

2018-10-22 19:27:33 +02:00
class Champs::SiretChampSerializer < ChampSerializer
has_one :etablissement
has_one :entreprise
def etablissement
object.etablissement
end
def entreprise
object.etablissement&.entreprise
end
end