I have this rails3 loop:
<div class="row">
<% recipes.each do |recipe| %>
<div class="col-md-3"><%= image_tag(recipe.tn_url, class: 'img-rounded') %><br>
<%= link_to recipe.name, recipe_path(recipe) %></div>
<% end %>
</div>
<br><br>
<% end %>
The inner loop:
is executing twice.
I've checked the database and there is only 1 record for each recipe.
Any ideas?
Aucun commentaire:
Enregistrer un commentaire