diff --git a/app/views/galleries/index.html.erb b/app/views/galleries/index.html.erb
index 7b00120..1f3a65b 100644
--- a/app/views/galleries/index.html.erb
+++ b/app/views/galleries/index.html.erb
@@ -8,7 +8,7 @@
<%= gallery.desc %>
<%= gallery.datum %>
- <%for f in gallery.fotos.slice(1..[gallery.fotos.length, 4].min)%>
+ <%gallery.fotos.slice(1..[gallery.fotos.length, 4].min).each do |f|%>
<%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid"}) %>
<% end %>
<%= link_to 'Edit', edit_gallery_path(gallery) %> | <%= link_to 'Destroy', gallery, method: :delete, data: { confirm: 'Are you sure?' } %>