docbrown/app/helpers/admin/settings_helper.rb
PJ 3f922921e5
Admin setting to control enabled countries for billboard geotargeting (#20083)
* use instance setting for enabled target geolocations

* add validation for enabled geolocations setting

* a start on the UI?

* backend tweaks for UI

* proper crack at autocomplete component

* fix region targeting toggle

* e2e spec
2023-09-12 12:06:00 -04:00

11 lines
302 B
Ruby

module Admin
module SettingsHelper
def billboard_enabled_countries_for_editing
::Settings::General.billboard_enabled_countries.to_json
end
def billboard_all_countries_for_editing
ISO3166::Country.all.to_h { |country| [country.alpha2, country.common_name] }
end
end
end