Created
February 20, 2009 02:23
-
-
Save nalanj/67261 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cycling Through A Set of Strings With Sequency | |
# | |
# It's pretty easy to use Sequency (http://github.com/commondream/sequency) to cycle through a set of | |
# strings when creating factories. | |
# | |
# I got this data from the US Social Security Administration website (http://www.ssa.gov/OACT/babynames/) | |
Sequence.define(:first_name) do |i| | |
names = %w( Jacob Emily Michael Isabella Ethan Emma Joshua Ava Daniel Madison Christopher | |
Sophia Anthony Olivia William Abigail Matthew Hannah Andrew Elizabeth ) | |
names[i % names.length] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment