active_admin and adding multiple images to gallery
I'm using active_admin and carrierwave gems. Have two simple models: class Image < ActiveRecord::Base attr_accessible :gallery_id, :file belongs_to :gallery mount_uploader :file, FileUploader end class Gallery < ActiveRecord::Base attr_accessible :description, :title, :file, :images_attributes has_many :images accepts_nested_attributes_for :images, allow_destroy: true mount_uploader :file, FileUploader end Now my active_admin form for Gallery looks like this: form do |f| f.inputs "Gallery" do f.input :title end f.has_many :images do |ff| ff.input :file end f.actions end Now I can upload one