Skip to content

Instantly share code, notes, and snippets.

@kelso
Created October 1, 2013 09:46
Show Gist options
  • Save kelso/6776121 to your computer and use it in GitHub Desktop.
Save kelso/6776121 to your computer and use it in GitHub Desktop.
category = Category.create(name: "A")
["produkt 1", "produkt 2"].each do |name|
product = category.products.build(name: name)
product.save!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment