mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
4e977da541
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. |
||
---|---|---|
.. | ||
action_view | ||
action_view.rb |