Why am i not able to create a fake picture?
Picture is polymorphic to several things including the model proposal:
This is my faker data:
for n in 1..10 do
picture = Picture.create!(
picture: Faker::Avatar.image("my-own-slug"),
imageable_type: 'Proposal',
imageable_id: n)
end
The imageable type and imageable id get saved correctly I can verify via console. but my picture field remains nil
picture: nil
If just run Faker::Avatar.image("my-own-slug")
in my console I get this:
"http://robohash.org/my-own-slug.png?size=300x300&set=set1"
which is what I am looking for. Why is it not working from my seed?
I am seeding alot of other data and it all is working well with Faker except images. Am i missing something?