First you need to add the gem to the GemFile
gem 'country-select'
Create a helper file '/app/helpers/active_admin/views_helper.rb'. Add code below
module ActiveAdmin::ViewsHelper def country_dropdown ActionView::Helpers::FormOptionsHelper::COUNTRIES end end
In your view file use
form do |f| f.inputs do f.input :country, as: :select, collection: country_dropdown end f.actions end
source share