Skip to content

Instantly share code, notes, and snippets.

@foxtacles
Last active October 24, 2016 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foxtacles/db8fe532038ea9a1d7a730c9b325a8d9 to your computer and use it in GitHub Desktop.
Save foxtacles/db8fe532038ea9a1d7a730c9b325a8d9 to your computer and use it in GitHub Desktop.
ActiveRecord::Base.transaction {
30000.times {
g = GlobalProduct.create;
g.global_product_codes.create(code_type: "asin", code: SecureRandom.hex).app_product_prices.create(source: "amazon", base_price: 4, full_price: 5, fetched_at: Date.today)
g.global_product_codes.create(code_type: "gtin", code: SecureRandom.hex).app_product_prices.create(source: "gshopping", base_price: 2, full_price: 3, fetched_at: Date.today)
} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment