Karl
unread,Jan 26, 2008, 4:43:22 PM1/26/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby Faker
I need these methods in Faker, so I though I would share:
Address::zip_code_five_only - only random 5 digit zip codes
Address::zip_code_plus_four - only random zip+4 zip codes
Note: Address::zip_code returns 5 digit and zip+4 zip codes which
was really messing up my day
Address::us_city - a random city name (from a list of real US
cities)
Name::middle_initial - a random, capital letter
Note: also changed 'Formats' so that it would occasionally
return a name with a middle initial
I didn't check the city names to see if there are any 'inappropriate'
names in there, but it came from a list of all the zip codes in the
US. About 150 random names selected from nearly 19,000.
Enjoy.