From 6963b91cbc3fbd432b50cca9b8a9dd5df7769cd1 Mon Sep 17 00:00:00 2001 From: MoisesMachado Date: Sat, 20 Oct 2007 03:27:47 +0000 Subject: [PATCH] ActionItem85: fixed a bug on witch it was listing persons on my enterprises --- app/models/person.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/person.rb b/app/models/person.rb index ea4a5e5..5d2f660 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -26,7 +26,7 @@ class Person < Profile :all, :conditions => self.class.conditions_for_profiles(conditions, self), :joins => "LEFT JOIN role_assignments ON profiles.id = role_assignments.resource_id AND role_assignments.resource_type = \'#{Profile.base_class.name}\'", - :select => 'profiles.*').uniq + :select => 'profiles.*').uniq.select{|p|p.class == Enterprise} end def info -- libgit2 0.21.2