From 138705521439fee653aa138cf2af3c05081a4cfb Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Tue, 8 Dec 2015 12:15:59 -0200 Subject: [PATCH] Revert "return distinct elements in by_enterprise scope" --- app/models/product_category.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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