Created
August 23, 2013 09:58
-
-
Save dmshvetsov/6317585 to your computer and use it in GitHub Desktop.
example of DRY seed.rb
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
country_list = [ | |
[ "Germany", 81831000 ], | |
[ "France", 65447374 ], | |
[ "Belgium", 10839905 ], | |
[ "Netherlands", 16680000 ] | |
] | |
country_list.each do |name, population| | |
Country.create( name: name, population: population ) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment