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

11 lines
185 B
Ruby

class Champs::CarteChampSerializer < ChampSerializer
has_many :geo_areas
def value
if object.value.present?
JSON.parse(object.value)
else
nil
end
end
end