joost / phony_rails

This Gem adds useful methods to your Rails app to validate, display and save phone numbers. It uses the super awesome Phony gem (https://github.com/floere/phony).
MIT License
556 stars 111 forks source link

return country from phone number #169

Closed aovertus closed 6 years ago

aovertus commented 7 years ago

Its confusing that country_code_from_number return a country_number

I would rather do country_number_from_number => "32" country_code_from_number => "BE"

But I don't want to break existing stuff.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.001%) to 99.81% when pulling e7aadacaf099df82c3e9b3a5e10820e26e34ad0b on aovertus:country_from_number into 9b002eceab087024cfd489351c83b4fe37460c46 on joost:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.001%) to 99.81% when pulling e7aadacaf099df82c3e9b3a5e10820e26e34ad0b on aovertus:country_from_number into 9b002eceab087024cfd489351c83b4fe37460c46 on joost:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.001%) to 99.81% when pulling 24ceced50f2e901ddd7803b15e4c1df0ecb573b8 on aovertus:country_from_number into 9b002eceab087024cfd489351c83b4fe37460c46 on joost:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.001%) to 99.81% when pulling 24ceced50f2e901ddd7803b15e4c1df0ecb573b8 on aovertus:country_from_number into 9b002eceab087024cfd489351c83b4fe37460c46 on joost:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.001%) to 99.81% when pulling e3dd65379be5399bd9f5967bd07a3a4804e7e67c on aovertus:country_from_number into 9b002eceab087024cfd489351c83b4fe37460c46 on joost:master.

aovertus commented 6 years ago

Hey @joost thanks for this phony_rails gem.

Do you mind to give me some feedbacks ? We would like to update the gem with this fix

joost commented 6 years ago

Thanks for the pull request. What is the intention? It introduces a new method?

aovertus commented 6 years ago

Hi @joost , yes its introducing a new method which allow developers to retrieve the country from the phone_number

PhonyRails.country_from_number('+32475000000') => 'BE'