I am wondering if it is possible to upload test images to the database
along with the other fake user data. I am using populator along with
faker for fake test data and it is working very well. I am able to do
User.populate 100 do |user| user.username = Faker::Name.first_name user.email = Faker::Internet.email
but I am wondering if theres a way to do something like:
User.populate 100 do |user| user.username = Faker::Name.first_name user.email = Faker::Internet.email Photo.populate 1 do |photo| photo.user_id = user.id ....
I know this is not possible with populator, but maybe someone can
enlighten me with the direction towards a function I can write on my
own? I am using attachment_fu now, but I am looking to switch to
paperclip in the near future. Also if anyone has other methods
excluding rake tasks for doing this please let me know. thanks.