Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'upstream/master' into two-point-oh

  • Loading branch information...
commit dbae8ff8b9f6d2aa8977d3e8d1138c6836e1f6dd 2 parents e2c2de4 + a67ae46
@scudco authored
View
1  lib/country_select.rb
@@ -47,6 +47,7 @@ def country_options_for_select(selected = nil, priority_countries = nil, use_loc
if priority_countries
priority_countries_options = priority_countries.map do |code|
+ code = code.upcase
[
::CountrySelect::countries(use_locale)[code],
code
View
4 lib/country_select/countries.rb
@@ -1,5 +1,5 @@
# encoding: utf-8
-require 'countries'
+require 'iso3166'
module CountrySelect
def self.use_iso_codes
@@ -21,7 +21,7 @@ def self.countries(with_locale=nil)
ISO3166::Country.all.inject({}) do |hash,country_pair|
default_name = country_pair.first
code = country_pair.last
- country = Country.new(code)
+ country = ISO3166::Country.new(code)
localized_name = country.translations[with_locale.to_s]
hash[code] = localized_name || default_name
View
2  spec/country_select_spec.rb
@@ -25,7 +25,7 @@ class Walrus
if defined?(Tags::Base)
content_tag(:option, 'United States of America', selected: :selected, value: "US")
else
- "<option value=\"US\" selected=\"selected\">United States of America</option>"
+ "<option value=\"us\" selected=\"selected\">United States of America</option>"
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.