do not show empty albums

This commit is contained in:
Espen Antonsen 2009-06-16 01:01:29 +02:00
parent 323f6aa836
commit dde62b43d4

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>