This project is archived and is in readonly mode.
number_to_phone helper doesn't work with 7 digits
Reported by Ryan | March 9th, 2009 @ 03:55 AM | in 2.x
I would expect number_to_phone to work for 7 digits, but it seems that it requires at least 8.
number_to_phone(8005551234) # => 800-555-1234
number_to_phone(5551234) # => 5551234
I've attached a test to verify the above behavior.
Comments and changes to this ticket
-
Ryan March 9th, 2009 @ 03:57 AM
- Tag changed from actionpack, actionview, bug to actionpack, actionview, bug, patch
Here's the proposed patch with updated tests.
-
Repository March 9th, 2009 @ 01:30 PM
- State changed from new to resolved
(from [1ab2ff58eddee8ac523624dd097424f9a760ad8b]) Fixed number_to_phone to work with 7 digit numbers [#2176 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
- Nobody is watching this ticket.
Attachments
Tags
Referenced by
- 2176 number_to_phone helper doesn't work with 7 digits (from [1ab2ff58eddee8ac523624dd097424f9a760ad8b]) Fixed n...