Fixed screenshots count in search results
Now packages without screenshots do not raise an exception any more.
This commit is contained in:
parent
950d48883c
commit
362745037a
1 changed files with 2 additions and 2 deletions
|
|
@ -1,11 +1,11 @@
|
|||
<%# Show search results %>
|
||||
|
||||
<% if @packages.count>0 %>
|
||||
<h1>Class=<%= @packages.class %></h1>
|
||||
<ul>
|
||||
<% @packages.each do |package| %>
|
||||
<h2><%= package.name %></h2>
|
||||
<li>
|
||||
<% if package.screenshots %>
|
||||
<% if package.screenshots.count>0 %>
|
||||
<%= image_tag package.screenshots.first.image_url('small') %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue