Commit a961f7a90842f109dae589cbc0ab81cdd15af11f

Authored by Arthur Esposte
1 parent 40a891fb

Remove depency with 'Software' categorie from categories_software view

Showing 1 changed file with 6 additions and 3 deletions   Show diff stats
views/blocks/categories_software.html.erb
... ... @@ -8,9 +8,12 @@
8 8 <p><%= _("Categories:") %></p>
9 9 <ul class="categories-mais-software">
10 10  
11   - <% Category.where(:name => "Software").first.children.each do |category| %>
12   - <% unless category.software_infos.count < 1 %>
13   - <li><%= link_to _("#{category.name}") + " (#{category.software_infos.count})", {:controller => :search, :action => :software_infos, :selected_categories_id => [category.id]} %></li>
  11 + <% categories = Category.where(:name => "Software") %>
  12 + <% unless categories.blank? %>
  13 + <% categories.first.children.each do |category| %>
  14 + <% unless category.software_infos.count < 1 %>
  15 + <li><%= link_to _("#{category.name}") + " (#{category.software_infos.count})", {:controller => :search, :action => :software_infos, :selected_categories_id => [category.id]} %></li>
  16 + <% end %>
14 17 <% end %>
15 18 <% end %>
16 19 </ul>
... ...