This project is archived and is in readonly mode.

#2176 ✓resolved
Ryan

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

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

Referenced by

Pages