module ActionView::Helpers::FormOptionsHelper

def country_options_for_select(selected = nil, priority_countries = nil)

def country_options_for_select(selected = nil, priority_countries = nil)
  country_options = "".html_safe
  if priority_countries
    priority_countries = [*priority_countries].map {|x| [x.html_safe,ISO3166::Country::NameIndex[x]] }
    country_options += options_for_select(priority_countries, selected)
    country_options += "<option value=\"\" disabled=\"disabled\">-------------</option>\n"
  end
  countries = ISO3166::Country::Names.map{|(name,alpha2)| [name.html_safe,alpha2] }
  return country_options + options_for_select(countries, selected)
end