lib/country_time.rb
# 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.
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.

Only the option tags are returned, you have to wrap this call in a regular HTML select tag.
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 . Only the option tags are returned you have to wrap this call in a regular HTML select tag .
def country_options_for_select(
        selected = nil, priority_countries = nil, skipped_countries = nil
      )
        country_options = ""
        value_type = CountryTime.value_type
        priority_country_options = CountryTime.priority_options_for_select(
          priority_countries, value_type
        )
        if priority_country_options
          country_options += options_for_select(
            priority_country_options, selected
          )
          country_options += "<option value=\"\" disabled=\"disabled\">#{CountryTime.label_text}</option>\n"
        end
        country_options << options_for_select(
          CountryTime.unprioritized_options_for_select(
            value_type, skipped_countries
          ),
          selected
        )
        country_options
      end
def country_options_for_select ( selected = nil , priority_countries = nil , skipped_countries = nil ) country_options = "" value_type = CountryTime . value_type priority_country_options = CountryTime . priority_options_for_select ( priority_countries , value_type ) if priority_country_options country_options += options_for_select ( priority_country_options , selected ) country_options += "<option value=\"\" disabled=\"disabled\">#{CountryTime.label_text}</option>\n" end country_options << options_for_select ( CountryTime . unprioritized_options_for_select ( value_type , skipped_countries ) , selected ) country_options end
Returns a string of option tags for pretty much any country in the world.
Returns a string of option tags for pretty much any country in the world .
selected
<not_specific>
priority_countries
<not_specific>
skipped_countries
<not_specific>