- # no file upload on ajax submit :( - unless @quick_edit = node f, field do = f.fields_for field.name do |f_file| - file = f.object.send(:read_attribute, field.name) - if file.is_a? Hash %p.warning= t('bhf.helpers.file.reselect') - else - file = f.object.send(field.name) - if file.is_a? ActionDispatch::Http::UploadedFile - file = f.object.send("#{field.name}_was") - if file.is_a?(String) - if is_image?(file) = image_tag file, class: 'uploaded_image' - else = link_to file, file, class: 'uploaded_file' - unless file.blank? .file_delete = f_file.check_box :delete = f_file.label :delete, t('bhf.helpers.file.delete') = f_file.file_field :file