0

I updated Rails to 5.2 version with ActiveStorage

Everything works fine, but when I perform a loop through my model attached files in order to display them as bootstrap cards, I see my files attributes on the page. I don't want it to display anything.

How can I prevent that?

  <strong style="margin: 10px">Files :</strong>
  <div class="card-columns">
  <%= @mymodel.files.each do |file| %>

  <% end %>
  </div>

what it makes on my page

Larry
  • 3
  • 2

1 Answers1

0

Remove the = from your loop header...

Instead of

<%= @mymodel.files.each do |file| %>

Use

<% @mymodel.files.each do |file| %>

Checkout what the difference is

Mark Merritt
  • 2,625
  • 2
  • 12
  • 16