Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActionView::Helpers::FormOptionsHelper

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.1.0) is shown here.

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.