demarches-normaliennes/app/models/champs/region_champ.rb
2018-10-15 20:55:46 +02:00

5 lines
152 B
Ruby

class Champs::RegionChamp < Champs::TextChamp
def self.regions
JSON.parse(ApiGeo::Driver.regions).sort_by { |e| e['nom'] }.pluck("nom")
end
end