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

6 lines
202 B
Ruby
Raw Normal View History

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