Commit 138705521439fee653aa138cf2af3c05081a4cfb

Authored by Antonio Terceiro
1 parent 3057b70b

Revert "return distinct elements in by_enterprise scope"

This reverts commit 3057b70bfe7e25e4dee80cae10c408238f040a02, which
caused several tests to fail.
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/product_category.rb
@@ -7,7 +7,7 @@ class ProductCategory < Category @@ -7,7 +7,7 @@ class ProductCategory < Category
7 7
8 scope :unique, :select => 'DISTINCT ON (path) categories.*' 8 scope :unique, :select => 'DISTINCT ON (path) categories.*'
9 scope :by_enterprise, -> enterprise { 9 scope :by_enterprise, -> enterprise {
10 - distinct.joins(:products). 10 + joins(:products).
11 where('products.profile_id = ?', enterprise.id) 11 where('products.profile_id = ?', enterprise.id)
12 } 12 }
13 scope :by_environment, -> environment { 13 scope :by_environment, -> environment {