Загрузка отчётов по ИНН

<% if notice %>

<%= notice %>

<% end %> <%= form_with url: reports_path, method: :post, local: true do |f| %> <%= f.label :inn, "Введите ИНН:" %> <%= f.text_field :inn, required: true %> <%= f.submit "Загрузить отчёт" %> <% end %>

История загрузок

<% @reports.each do |report| %>

ИНН: <%= report.inn %> | Статус: <%= report.status %>

<% if report.files.attached? %>

Файлы:

<% report.files.each do |file| %> <%= link_to file.filename, rails_blob_path(file, disposition: "attachment") %> <% end %> <% end %>
<% end %>