From f7ecf4866953cbfb0bc2a092b8547192f2943242 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 29 Apr 2013 15:40:13 +0200 Subject: list users of specified parent only --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 99e2fc5..971ce4b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -9,7 +9,7 @@ class UsersController < ApplicationController helper_method :sort_column, :sort_descending def index - @users = User.order(sort_column + ' ' + (sort_descending ? 'DESC' : 'ASC')).paginate( + @users = @parent.users.order(sort_column + ' ' + (sort_descending ? 'DESC' : 'ASC')).paginate( :page => @pagination_page_number, :per_page => GsParameter.get('DEFAULT_PAGINATION_ENTRIES_PER_PAGE') ) -- cgit v1.2.3