This project is archived and is in readonly mode.

#6414 new
PJ Davis

number_to_phone error when using 7 digits and :area_code => true

Reported by PJ Davis | February 11th, 2011 @ 07:03 PM

When using number_to_phone with a seven digit number and using :area_code => true, I get

TypeError: can't convert nil into String

number_to_phone(5551234, {:area_code => true})

I've attached the following test to confirm.

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

Pages