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

6 lines
205 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 16:30:27 +02:00
JSON.parse(ApiGeo::Driver.departements).map { |liste| "#{liste['code']} - #{liste['nom']}" }.push('99 - Étranger')
end
2018-02-13 18:18:20 +01:00
end