one if less deep

This commit is contained in:
simon lehericey 2024-11-06 12:09:58 +01:00
parent cd3e645046
commit 92e29c6e13
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5

View file

@ -558,14 +558,12 @@ class TypeDeChamp < ApplicationRecord
APIGeoService.departements.map { ["#{_1[:code]} #{_1[:name]}", _1[:code]] }.sort
elsif region?
APIGeoService.regions.map { [_1[:name], _1[:code]] }
elsif choice_type?
if drop_down_list?
drop_down_options
elsif yes_no?
Champs::YesNoChamp.options
elsif checkbox?
Champs::CheckboxChamp.options
end
elsif drop_down_list?
drop_down_options
elsif yes_no?
Champs::YesNoChamp.options
elsif checkbox?
Champs::CheckboxChamp.options
end
end