2022-09-08 11:25:39 +02:00
|
|
|
class EditableChamp::RegionsComponent < EditableChamp::EditableChampBaseComponent
|
2022-08-12 10:45:04 +02:00
|
|
|
include ApplicationHelper
|
2022-12-20 21:29:37 +01:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def options
|
|
|
|
APIGeoService.regions.map { [_1[:name], _1[:code]] }
|
|
|
|
end
|
|
|
|
|
|
|
|
def select_options
|
|
|
|
{ selected: @champ.selected }.merge(@champ.mandatory? ? { prompt: '' } : { include_blank: '' })
|
|
|
|
end
|
2022-08-12 10:45:04 +02:00
|
|
|
end
|