aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb
Commit message (Collapse)AuthorAgeFilesLines
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-1/+0
|
* `number_to_phone` formats number with regexpPan GaoYong2016-04-021-2/+11
| | | | | | | | | | | | By default, this method formats US number. This commit extends its functionality to format number for other countries with a custom regular expression. number_to_phone(18812345678, pattern: /(\d{3})(\d{4})(\d{4})/) # => 188-1234-5678 The output phone number is divided into three groups, so the regexp should also match three groups of numbers.
* Nodoc missing number helper classes in AS [ci skip]Carlos Antonio da Silva2013-12-111-1/+1
| | | | These classes are not meant to be public.
* Change delimiter check order: first check if it is presentCarlos Antonio da Silva2013-12-031-3/+3
| | | | | | | This reads a lot better, and we won't need to try start_with? for blank delimiters. Also rename method name to read better.
* Make both conversion methods work similarlyCarlos Antonio da Silva2013-12-031-1/+2
| | | | | The conversion without area code already changed the passed number in place, so change the other method to do the same.
* Remove useless empty stringCarlos Antonio da Silva2013-12-031-2/+1
|
* No need for #tapCarlos Antonio da Silva2013-12-031-4/+3
|
* Stop using local variables everywhere, make use of the readerCarlos Antonio da Silva2013-12-031-1/+1
|
* :sicssors:Rafael Mendonça França2013-12-021-1/+0
|
* Make load of NumberHelper thread safeRafael Mendonça França2013-12-021-0/+51