1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix minor typo in pattern example for number_to_phone [ci skip]

There is an extra closing parenthesis on the last example for `number_to_phone` which causes it to be invalid
This commit is contained in:
Michael MacDonald 2019-11-28 22:08:39 +11:00 committed by GitHub
parent 6e24d164a9
commit 2863619b94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ module ActionView
#
# number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true)
# # => "(755) 6123-4567"
# number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/))
# number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/)
# # => "133-1234-5678"
def number_to_phone(number, options = {})
return unless number