Adds "sorted" scope to Principal and User and sort users/groups properly.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11259 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-01-23 17:44:28 +00:00
parent c7df78f3b6
commit e53a5de918
8 changed files with 33 additions and 4 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ class WatchersController < ApplicationController
end
def autocomplete_for_user
@users = User.active.like(params[:q]).limit(100).all
@users = User.active.sorted.like(params[:q]).limit(100).all
if @watched
@users -= @watched.watcher_users
end