Rename champ.zones to champ.geo_json
This commit is contained in:
parent
2462e42b53
commit
18815e88a3
2 changed files with 5 additions and 5 deletions
|
@ -43,7 +43,7 @@ class Champs::CarteChamp < Champ
|
|||
end
|
||||
end
|
||||
|
||||
def zones
|
||||
value.blank? ? [] : JSON.parse(value)
|
||||
def geo_json
|
||||
@geo_json ||= value.blank? ? [] : JSON.parse(value)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- elsif champ.value.blank?
|
||||
Aucune zone tracée
|
||||
- elsif champ.quartiers_prioritaires.blank?
|
||||
= t('errors.messages.quartiers_prioritaires_empty', count: champ.zones.size)
|
||||
= t('errors.messages.quartiers_prioritaires_empty', count: champ.geo_json.size)
|
||||
- else
|
||||
%ul
|
||||
- champ.quartiers_prioritaires.each do |qp|
|
||||
|
@ -20,7 +20,7 @@
|
|||
- elsif champ.value.blank?
|
||||
Aucune zone tracée
|
||||
- elsif champ.cadastres.blank?
|
||||
= t('errors.messages.cadastres_empty', count: champ.zones.size)
|
||||
= t('errors.messages.cadastres_empty', count: champ.geo_json.size)
|
||||
- else
|
||||
%ul
|
||||
- champ.cadastres.each do |pc|
|
||||
|
@ -34,7 +34,7 @@
|
|||
- elsif champ.value.blank?
|
||||
Aucune zone tracée
|
||||
- elsif champ.parcelles_agricoles.blank?
|
||||
= t('errors.messages.parcelles_agricoles_empty', count: champ.zones.size)
|
||||
= t('errors.messages.parcelles_agricoles_empty', count: champ.geo_json.size)
|
||||
- else
|
||||
%ul
|
||||
- champ.parcelles_agricoles.each do |pa|
|
||||
|
|
Loading…
Reference in a new issue