Skip to content

Instantly share code, notes, and snippets.

@dmshvetsov
Created August 23, 2013 09:58
Show Gist options
  • Save dmshvetsov/6317585 to your computer and use it in GitHub Desktop.
Save dmshvetsov/6317585 to your computer and use it in GitHub Desktop.
example of DRY seed.rb
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