summaryrefslogtreecommitdiffstats
path: root/app/controllers/groups_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r--app/controllers/groups_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 0cd4055e5..555fc61df 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -25,12 +25,16 @@ class GroupsController < ApplicationController
helper :custom_fields
def index
- @groups = Group.sorted.all
respond_to do |format|
format.html {
+ @groups = Group.sorted.all
@user_count_by_group_id = user_count_by_group_id
}
- format.api
+ format.api {
+ scope = Group.sorted
+ scope = scope.givable unless params[:builtin] == '1'
+ @groups = scope.all
+ }
end
end