Last active
October 24, 2016 13:26
-
-
Save foxtacles/db8fe532038ea9a1d7a730c9b325a8d9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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