simple_form_for(['<%= options.namespace %>', @item], html: {multipart: true, novalidate: true, class: 'js-file-form'}, remote: true, data: {type: “html”}) do |f|¶ ↑
<% @form_attrs.each do |attr| -%>
= fae_input f, :<%= attr %>
<% end -%> <% @attachments.each do |attachment| %> <% if attachment.type == :image -%>
= fae_image_form f, :<%= attachment.name -%>
<% elsif attachment.type == :file -%>
= fae_file_form f, :<%= attachment.name -%>
<% end -%> <% end -%> <% if options.parent_model.present? %>
= f.hidden_field :<%= options.parent_model.underscore %>_id
<% end -%>
= f.submit = button_tag 'Cancel', type: 'button', class: 'js-cancel-nested cancel-nested-button'