From 34560e6e8dbe1cd5b7f90a096b7475bc06031f8b Mon Sep 17 00:00:00 2001 From: MoisesMachado Date: Sat, 12 Jul 2008 21:42:41 +0000 Subject: [PATCH] ActionItem501: fixed the load of the rigth categories for little icons --- app/models/environment_finder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/environment_finder.rb b/app/models/environment_finder.rb index b88f62a..bbb1724 100644 --- a/app/models/environment_finder.rb +++ b/app/models/environment_finder.rb @@ -29,7 +29,7 @@ class EnvironmentFinder if product_category && asset == :products @environment.send(asset).send(finder_method, :all, options.merge(:include => 'product_categorizations', :conditions => ['product_categorizations.category_id = (?)', product_category.id])) elsif product_category && asset == :enterprises - @environment.send(asset).send(finder_method, :all, options.merge(:order => 'profiles.name', :include => 'products', :joins => 'inner join product_categorizations on (product_categorizations.product_id = products.id)', :conditions => ['product_categorizations.category_id = (?)', product_category.id])) + @environment.send(asset).send(finder_method, :all, options.merge( :order => 'profiles.name', :joins => 'inner join products on (products.enterprise_id = profiles.id) inner join product_categorizations on (product_categorizations.product_id = products.id)', :conditions => ['product_categorizations.category_id = (?)', product_category.id])) else if (asset == :events) && date_range @environment.send(asset).send(finder_method, :all, options.merge(:conditions => { :start_date => date_range})) -- libgit2 0.21.2