Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. ActiveRecord::Base.transaction {
  2. 30000.times {
  3. g = GlobalProduct.create;
  4. 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)
  5. 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)
  6. } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement