diff --git a/app/models/product_category.rb b/app/models/product_category.rb index 901df33..4039b88 100644 --- a/app/models/product_category.rb +++ b/app/models/product_category.rb @@ -7,7 +7,7 @@ class ProductCategory < Category scope :unique, :select => 'DISTINCT ON (path) categories.*' scope :by_enterprise, -> enterprise { - distinct.joins(:products). + joins(:products). where('products.profile_id = ?', enterprise.id) } scope :by_environment, -> environment { -- libgit2 0.21.2