From 195bb24186d8bcc4d04663f3b6f02304aaefb7f7 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Tue, 20 Aug 2013 17:50:53 -0300 Subject: [PATCH] [postgres-tests] Fixing enterprise registration tests --- app/models/region.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/region.rb b/app/models/region.rb index 143a30e..8e262de 100644 --- a/app/models/region.rb +++ b/app/models/region.rb @@ -8,7 +8,7 @@ class Region < Category validators.count > 0 end - named_scope :with_validators, :select => 'DISTINCT categories.id', + named_scope :with_validators, :select => 'DISTINCT ON (categories.id) *', :joins => 'INNER JOIN region_validators on (region_validators.region_id = categories.id)' end -- libgit2 0.21.2