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

12 lines
185 B
Ruby
Raw Normal View History

2018-10-22 19:27:52 +02:00
class Champs::CarteChampSerializer < ChampSerializer
has_many :geo_areas
def value
if object.value.present?
JSON.parse(object.value)
else
nil
end
end
end