I'm looking at this documentation, and I'm having trouble coming up with a solution in creating checkboxes to my images, but associated to the form?
If you see below, my images are looped inside the form...
edit view
<%= simple_form_for @project, html: { multipart: true } do |f| %>
<% @project.project_images.each do |img| %>
<%= attachment_image_tag(img, :file, :fit, 1000, 430) %>
<% end %>
<%= f.attachment_field :trip_images_files, multiple: true %>
<%= f.button :submit %>
<% end %>
I can add <%= f.check_box :remove_project_images %>
inside the .each loop?
<% @project.project_images.each do |img| %>
<%= attachment_image_tag(img, :file, :fit, 1000, 430) %>
<%= f.check_box :remove_project_images_files %>
<% end %>
Actually, at the time of writing this.. I'm getting undefined method 'remove_project_images_files'
, now I'm not even sure at all.