method

country_options_for_select

Importance_1
v2.1.0 - Show latest stable - 0 notes - Class: ActionView::Helpers::FormOptionsHelper
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.

NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.

Show source
Register or log in to add new notes.