I\'ve been searching for some examples, but have come up short:
I\'m trying to implement JQuery-File-Upload on a project I\'m working on, but am getting lost as to h
I have coped with this problem and made a demo app to show how to do this.
In short I have two models: item and upload.
item.rb:
has_many :uploads
accepts_nested_attributes_for :uploads, :allow_destroy => true
upload.rb:
belongs_to :item
has_attached_file :upload, :styles => { :large => "800x800", :medium => "400x400>", :small => "200x200>" }
I added uploads_attributes to item controller.
Now you can add jquery-file-upload form to your view, but there is one problem: it sends each photo in separate requests. So there is my jquery-file-upload initializer, which uploads all photos in one request (creating item model) and then redirecting to the root of your app (you need to use item form):