<%= form_with(model: @result, url: result_asset_path(format: :json), data: { remote: true }, html: {class: 'edit-result-asset'}) do |f| %> <%= f.text_field :name, style: "margin-top: 10px;" %>
<%= f.fields_for :asset do |ff| %> <%=t "result_assets.edit.uploaded_asset" %>

<%= file_extension_icon(ff.object) %> <%= ff.object.file_name %>

<%= ff.file_field :file, direct_upload: true %> <% end %>
<%= f.button t("general.save"), class: 'btn btn-primary save-result' %>
<% end %> <%= javascript_include_tag 'results/result_assets/edit', nonce: true %>