summaryrefslogtreecommitdiff
path: root/app/controllers/admin/communities_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin/communities_controller.rb')
-rw-r--r--app/controllers/admin/communities_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admin/communities_controller.rb b/app/controllers/admin/communities_controller.rb
index cb6d6d4..e44ab6a 100644
--- a/app/controllers/admin/communities_controller.rb
+++ b/app/controllers/admin/communities_controller.rb
@@ -28,7 +28,7 @@ class Admin::CommunitiesController < ApplicationController
end
def list
- @communities=Community.all.uniq
+ @communities=Community.all.distinct
end
def show
@@ -71,7 +71,7 @@ class Admin::CommunitiesController < ApplicationController
# lists all participants of the community
def index_participants
@community = Community.find(params[:id])
- @participants=Community.find(params[:id]).memberships.collect {|i| i.participant }.uniq.sort{|x,y| x.id <=> y.id }
+ @participants=Community.find(params[:id]).memberships.collect {|i| i.participant }.distinct.sort{|x,y| x.id <=> y.id }
end
# lists all those participants which has not joined the community