mardi 10 mars 2015

How to upload multiple files with Carrierwave into a single json/array column

I have an Activerecord model in a Rails 3 project to which I'm trying to upload multiple file attachments.


In the current release of Carrierwave it talks about now being able to store multiple uploaded files in a single a ActiveRecord field of array or Json types - so I'm attempting to get this approach to work and I'm unclear on how to implement this.


In all the tutorials/railscasts/SO questions I've only found people using the more traditional has_many relationship to link to separate attachment records.


Can anyone post or point me to a working example of getting Carrierwave to use a single JSON field to upload multiple files?


Aucun commentaire:

Enregistrer un commentaire