This project is archived and is in readonly mode.
Add 'groupings' option to number_to_phone helper
Reported by Tim Morgan | October 19th, 2008 @ 11:57 PM | in 2.x
This will allow the method to handle many more countries. For example, mobile phones in Australia use the format "0412 345 678" and landlines use the format "(02) 1234 5678". The 'groupings' option makes generating these formats possible:
number_to_phone('0212345678', :groupings => [2, 4, 4], :area_code => true, :delimiter => " ") # => (02) 1234 5678
number_to_phone('0412345678', :groupings => [4, 3, 3], :delimiter => " ") # => 0412 345 678
Comments and changes to this ticket
-
Tim Morgan October 19th, 2008 @ 11:59 PM
- Title changed from Add 'grouping' option to number_to_phone helper to Add 'groupings' option to number_to_phone helper
-
Tim Morgan October 22nd, 2008 @ 04:06 AM
Updated patch attached...
Updated commit here: http://github.com/seven1m/rails/...
-
Michael Koziarski October 26th, 2008 @ 06:18 PM
- Assigned user set to Michael Koziarski
I'll take a look at this post 2.2, sorry you got no reply for a while.
-
Pratik March 6th, 2009 @ 04:23 PM
I think this should just be a custom helper method, rather than a core feature.
-
Pratik June 21st, 2009 @ 05:11 PM
- State changed from new to wontfix
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>