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
554 stars 111 forks source link

Extension option added to normalize_number #176

Closed ramaboo closed 6 years ago

ramaboo commented 6 years ago

This adds support for PhonyRails.normalize_number('555-123-1234 x44', extension: false) == '+15551231234'

Your gem is a life saver but sometimes I have needed to normalize a number and drop the extension (for example using twilio) and now that's possible. Hopefully others find this change useful.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.0007%) to 99.811% when pulling 9a39f4637aca951a19d116805fc46c58275ced8e on ramaboo:option-no-extension into 000153978f1366204a44e6329170ac3465b72fa5 on joost:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.0007%) to 99.811% when pulling 9a39f4637aca951a19d116805fc46c58275ced8e on ramaboo:option-no-extension into 000153978f1366204a44e6329170ac3465b72fa5 on joost:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.0007%) to 99.811% when pulling 9a39f4637aca951a19d116805fc46c58275ced8e on ramaboo:option-no-extension into 000153978f1366204a44e6329170ac3465b72fa5 on joost:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.0007%) to 99.811% when pulling 34eb21e91b249a103dc56758f22d6332180c38de on ramaboo:option-no-extension into 000153978f1366204a44e6329170ac3465b72fa5 on joost:master.

joost commented 6 years ago

If you fix the rubocop issue (or make it ignore it) I will merge.