-r = rand(99999999) .note_file_form#note_file_form{:id => r} -note_file = note_file || NoteFile.new(:note_id => note.id) = form_for note_file, :url => note_files_path(), :html => { :id => "note_file_upload_field_#{r}", :multipart => true } do |f| =f.label :file, "Selectionner des fichiers" = f.file_field :file, :multiple => true = f.hidden_field :note_id = f.hidden_field :file_cache .note_file_queue#note_file_queue{:id => r} %table#files{:id => r} %script ="init_upload_fields(#{r});"