Commit 62af77c0d53543b3371a0d09f13b83f7d39956bf
1 parent
cf9f150d
Exists in
master
and in
28 other branches
ActionItem93: fixed listing of products per category
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1043 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/controllers/public/category_controller.rb
... | ... | @@ -29,7 +29,7 @@ class CategoryController < ApplicationController |
29 | 29 | |
30 | 30 | protected |
31 | 31 | def product_category |
32 | - @products = Product.find(:all, :conditions => ['product_category_id = ?', @category.id]) | |
32 | + @products = @category.all_products | |
33 | 33 | @enterprises = Enterprise.find(:all, :conditions => ['products.id in (?)', @products.map(&:id)], :include => :products) |
34 | 34 | end |
35 | 35 | ... | ... |