do not show empty albums

rails2
Espen Antonsen 2009-06-16 01:01:29 +02:00
parent 323f6aa836
commit dde62b43d4
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
<% for collection in @collections %>
<div class="thumb">
<h3><%= link_to collection.title, collection %></h3>
<%= link_to (image_tag collection.albums.find(:first).photos.first.path_modified_public('collection') ), collection_path(collection) %>
<%= link_to (image_tag collection.albums.find(:first).photos.first.path_modified_public('collection') ), collection_path(collection) unless collection.albums.empty? || collection.albums.find(:first).photos.empty? %>
</div>
<% end %>
</div>