ruby on rails - ActiveAdmin + Carrierwave + Multiple Image Upload -


i'm using rails 5 , cannot find solution upload multiple images when using activeadmin. code below. appreciate

i keep getting message in logs , images won't upload: unpermitted parameter: pic_attachments

activeadmin.register art   permit_params :name, picture: []    form html: { multipart: true } |f|     f.semantic_errors *f.object.errors.keys       f.file_field :picture, multiple: true, required: true, name: "pic_attachments[picture][]"      f.actions  end  end 

models:

class art < applicationrecord     mount_uploader :picture, pictureuploader     has_many :pic_attachments, dependent: :destroy       accepts_nested_attributes_for :pic_attachments  end  class picattachment < applicationrecord     mount_uploader :picture, pictureuploader     belongs_to :art     validates_associated :art end 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -