Add Carte champs support to the API
This commit is contained in:
parent
17418edb54
commit
7cf225d443
4 changed files with 52 additions and 0 deletions
11
app/serializers/champs/carte_champ_serializer.rb
Normal file
11
app/serializers/champs/carte_champ_serializer.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class Champs::CarteChampSerializer < ChampSerializer
|
||||
has_many :geo_areas
|
||||
|
||||
def value
|
||||
if object.value.present?
|
||||
JSON.parse(object.value)
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue