Open tamlyn10 opened 8 years ago
Hello,
The problem lies in the controller, the photos parameter is not properly referenced as the array it is.
You have
params.require(:campaign).permit(:question, :option_1, :option_2, :user_id, :image, :photos, :avatar).merge(user)
Whereas you should have
params.require(:campaign).permit(:question, :option_1, :option_2, :user_id, :image, photos: [], :avatar).merge(user)
I hope this helps. Regards. P.
Hi there, in my Rails 5 app, I've managed to get attachinary working well with the singular (has_attachment), however, the plural/multiple files doesn't seem to be saving to my database / working in with ActiveRecord. They ARE being uploaded to my Cloudinary account but my database has no record of them. I'm applying this to a Campaign model. Any @campaign instance I create happily returns @campaign.image, @campaign.avatar. However, @campaign.photos, returns:
despite the fact that they ARE in my params (and uploaded to Cloudinary).
Archive.zip