Skip to content

Commit

Permalink
Removes DEPRECATION WARNING: find_by_name
Browse files Browse the repository at this point in the history
  Replace find_by_name with find_by_unofficial_names per recommendation from gem Countries version 5.x
  • Loading branch information
filipemendespi authored and scudco committed Jan 20, 2022
1 parent 4ea18b9 commit d75a064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/country_select/tag_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def country_options_for(country_codes, sorted=true)
country_list = country_codes.map do |code_or_name|
if country = ISO3166::Country.new(code_or_name)
code = country.alpha2
elsif country = ISO3166::Country.find_by_name(code_or_name)
elsif country = ISO3166::Country.find_by_unofficial_names(code_or_name)
code = country.first
country = ISO3166::Country.new(code)
end
Expand Down

0 comments on commit d75a064

Please sign in to comment.