Skip to content

Instantly share code, notes, and snippets.

@GuskiS
Created October 28, 2015 10:47
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 GuskiS/9bbedd09db2d9d1a7b0d to your computer and use it in GitHub Desktop.
Save GuskiS/9bbedd09db2d9d1a7b0d to your computer and use it in GitHub Desktop.
fruits = Category.create(title: 'Fruits', description: "Ain't no veggie")
veggies = Category.create(title: 'Vegetables', description: "Ain't no fruit")
fruits.items.create(title: 'Apple', price: 100, expire_at: DateTime.now, count_1: rand(1..5), count_2: rand(1..5), count_3: rand(1..5), count_4: rand(1..5), validated: true)
fruits.items.create(title: 'Pear', price: 150, expire_at: DateTime.now + 2.days, count_1: rand(1..5), count_2: rand(1..5), count_3: rand(1..5), count_4: rand(1..5), validated: false)
fruits.items.create(title: 'Orange', price: 100, expire_at: DateTime.now + 2.days, count_1: rand(1..5), count_2: rand(1..5), count_3: rand(1..5), count_4: rand(1..5), validated: true)
veggies.items.create(title: 'Cucumber', price: 100, expire_at: DateTime.now + 3.days, count_1: rand(1..5), count_2: rand(1..5), count_3: rand(1..5), count_4: rand(1..5), validated: true)
veggies.items.create(title: 'Carrot', price: 150, expire_at: DateTime.now + 4.days, count_1: rand(1..5), count_2: rand(1..5), count_3: rand(1..5), count_4: rand(1..5), validated: false)
veggies.items.create(title: 'Spinach', price: 100, expire_at: DateTime.now + 4.days, count_1: rand(1..5), count_2: rand(1..5), count_3: rand(1..5), count_4: rand(1..5), validated: true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment