Skip to content

Commit

Permalink
Merge pull request #105 from humancopy/master
Browse files Browse the repository at this point in the history
Get country data in a more straight forward way
  • Loading branch information
Joost Hietbrink committed Jul 13, 2015
2 parents cd2afab + 7a07371 commit 79c2b31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/phony_rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module PhonyRails

def self.country_number_for(country_code)
ISO3166::Country::Setup.data[country_code.to_s.upcase].try(:[], 'country_code')
ISO3166::Country[country_code.to_s.upcase].try(:data).try(:[], 'country_code')
end

# This method requires a country_code attribute (eg. NL) and phone_number to be set.
Expand Down

0 comments on commit 79c2b31

Please sign in to comment.