More tests and fixes on carte champ
This commit is contained in:
parent
e25f84209a
commit
d77a5c9f15
7 changed files with 172 additions and 44 deletions
|
@ -6,13 +6,7 @@ module ChampHelper
|
|||
|
||||
def geo_data(champ)
|
||||
# rubocop:disable Rails/OutputSafety
|
||||
raw({
|
||||
position: champ.position,
|
||||
selection: champ.value.present? ? JSON.parse(champ.value) : [],
|
||||
quartiersPrioritaires: champ.quartiers_prioritaires? ? champ.quartiers_prioritaires.as_json(except: :properties) : [],
|
||||
cadastres: champ.cadastres? ? champ.cadastres.as_json(except: :properties) : [],
|
||||
parcellesAgricoles: champ.parcelles_agricoles? ? champ.parcelles_agricoles.as_json(except: :properties) : []
|
||||
}.to_json)
|
||||
raw(champ.to_render_data.to_json)
|
||||
# rubocop:enable Rails/OutputSafety
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue