Skip to content

Instantly share code, notes, and snippets.

@JoshCheek
Created October 1, 2015 17:20
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 JoshCheek/294543a628fa04fd0fc5 to your computer and use it in GitHub Desktop.
Save JoshCheek/294543a628fa04fd0fc5 to your computer and use it in GitHub Desktop.
asdf
users = 5.times.map do
User.create! email: Faker::Internet.email,
zipcode: Faker::Address.zip_code,
name: Faker::Name.name,
wishlist_id: "579KNEDD72QR",
story: Faker::Lorem.sentences(5).join(" "),
avatar: "http://robohash.org/#{Faker::Lorem.words.join}.png?size=400x400&set=set2"
end
2.times do
Collection.create! do |c|
c.title = Faker::Lorem.words.map(&:capitalize).join(' ')
c.description = Faker::Lorem.sentence
c.user_id = users.sample.id
c.image = 'http://lorempixel.com/400/200/abstract/?Y=400&X=400'
8.times do
c.pieces.build name: Faker::Company.name, image: 'http://lorempixel.com/400/200/abstract/?Y=400&X=400'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment