Sha256: 49e5d85d2af7b1d690fc573f4c3621973ceba9b3196bd67a0667b69e2a8d083c
Contents?: true
Size: 805 Bytes
Versions: 78
Compression:
Stored size: 805 Bytes
Contents
- # 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
Version data entries
78 entries across 78 versions & 1 rubygems