country_options_for_select(selected = nil, priority_countries = nil)public
Returns a string of option tags for pretty much any country in the world. Supply a country name as selected to have it marked as the selected option tag. You can also supply an array of countries as priority_countries, so that they will be listed above the rest of the (long) list.
# File actionpack/lib/action_view/helpers/form_options_helper.rb, line 197 def country_options_for_select(selected = nil, priority_countries = nil) country_options = "" if priority_countries country_options += options_for_select(priority_countries, selected) country_options += "<option value=\"\">-------------</option>\n" end if priority_countries && priority_countries.include?(selected) country_options += options_for_select(COUNTRIES - priority_countries, selected) else country_options += options_for_select(COUNTRIES, selected) end return country_options end