Multiple file upload with postgres and arrierwave
Here is the quick way to store multiple images in a column.
First, In a Model
of your choice
mount_uploaders :images, ImageUploader
After that, create an array column in a desired table
add_column :items, :images, :string, array: true
Then in a View
add button for multiupload
= f.file_field :images, multiple: true
Аnd in a Controller
you need to get images from params
and save them
@item.images = params['item']['images']
Written by Nikita
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#