More tests and fixes on carte champ

This commit is contained in:
Paul Chavard 2018-11-30 13:19:19 +01:00
parent e25f84209a
commit d77a5c9f15
7 changed files with 172 additions and 44 deletions

View file

@ -14,7 +14,9 @@ class ChampSerializer < ActiveModel::Serializer
when GeoArea
object.geometry.to_json
when Champs::CarteChamp
object.user_geometry.to_json
if object.geo_json.present?
object.geo_json.to_json
end
when Champs::DecimalNumberChamp
if object.value.present?
object.value.to_f