I have a model called Recipe that has 2 images that use a carrier wave, so in this model I have this to set the carrier wave
mount_uploader :author_photo, AuthorUploader mount_uploader :photo, PhotoUploader
I also added several versions to my images, such as large, small, medium, large
Problem. let's say i have 2 images
Chocolate_Cake.jpg as the photo My_Photo.jpg as author_photo
When I enter the console and upload my recipe and recipe.to_json, I get both of my images back from the carrier, but they both show a photograph for the recipe, not a photograph of the author.
"recipe": [ { "author_photo": { "url": "/uploads/recipe/photo/8/Chocolate_Cake.jpg", "thumb": { "url": "/uploads/recipe/photo/8/thumb_Chocolate_Cake.jpg" }, "small": { "url": "/uploads/recipe/photo/8/small_Chocolate_Cake.jpg" }, "medium": { "url": "/uploads/recipe/photo/8/medium_Chocolate_Cake.jpg" }, "large": { "url": "/uploads/recipe/photo/8/large_Chocolate_Cake.jpg" } }, "id": 8, "photo": { "url": "/uploads/recipe/photo/8/Chocolate_Cake.jpg", "thumb": { "url": "/uploads/recipe/photo/8/thumb_Chocolate_Cake.jpg" }, "small": { "url": "/uploads/recipe/photo/8/small_Chocolate_Cake.jpg" }, "medium": { "url": "/uploads/recipe/photo/8/medium_Chocolate_Cake.jpg" }, "large": { "url": "/uploads/recipe/photo/8/large_Chocolate_Cake.jpg" } },
So for some reason, my json answer is not showing my loaders properly.
If I were to enter this in the console,
recipe.photo recipe.author_photo
They come up with different image urls