app/views/otus/batch_load/simple/batch_preview.html.erb
<h2> Batch preview </h2>
<h3> Read file </h3>
<pre><%= @file -%></pre>
<h3> Result </h3>
<%= form_tag create_simple_batch_load_otus_path do -%>
<% @otus.each_with_index do |o, i| %>
<div id="otus"> <%= text_field_tag("otus[#{i}][name]", o.name) -%> <%= link_to('Remove', "#", data: { turbolinks: false }, class: 'remove_link') %> <%= similarly_named_records_list(o) -%> </div>
<% end %>
<%= submit_tag(:create) -%>
<% end %>
<%# remove this -%>
<script>
$(function() {
$('.remove_link').click(function() {
$(this).parent().remove();
});
});
</script>