sort departement options

This commit is contained in:
simon lehericey 2024-11-06 12:03:22 +01:00
parent 690d2c6258
commit cd3e645046
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5

View file

@ -555,7 +555,7 @@ class TypeDeChamp < ApplicationRecord
def options_for_select
if departement?
APIGeoService.departements.map { ["#{_1[:code]} #{_1[:name]}", _1[:code]] }
APIGeoService.departements.map { ["#{_1[:code]} #{_1[:name]}", _1[:code]] }.sort
elsif region?
APIGeoService.regions.map { [_1[:name], _1[:code]] }
elsif choice_type?