Currently the packages controller is not working well. The JOIN is not the best way apparently as the 'description' column exists for both the "packages" and the "screenshots" table. So another way to query for the data needs to be found.
16 lines
417 B
Text
16 lines
417 B
Text
<%# Show search results %>
|
|
|
|
<% if @packages.count>0 %>
|
|
<h1>Class=<%= @packages.class %></h1>
|
|
<ul>
|
|
<% @packages.each do |package| %>
|
|
<li>
|
|
<%= package.name %> <i>(<%= package.description %>)</i>
|
|
- has <%= package.screenshots.count %> screenshots
|
|
<% if package.screenshots.count>0 %>
|
|
<%= image_tag package.screenshots.first.image_url('small') %>
|
|
<% end %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
<% end %>
|