demarches-normaliennes/app/models/champs/departement_champ.rb

6 lines
212 B
Ruby
Raw Normal View History

2018-02-13 18:18:20 +01:00
class Champs::DepartementChamp < Champs::TextChamp
def self.departements
JSON.parse(Carto::GeoAPI::Driver.departements).map { |liste| "#{liste['code']} - #{liste['nom']}" }.push('99 - Étranger')
end
2018-02-13 18:18:20 +01:00
end