diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-07-14 12:16:20 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-07-14 16:31:45 +0100 |
commit | 574b3efd6bfe7df64ec704844f2619c547731aa6 (patch) | |
tree | 4561b1d84dff79e8561fe42c9afa198f46db4c83 /app/models/user.rb | |
parent | 60b91b46f289b1e4ac72827cf01370b2604622ac (diff) | |
download | gitlab-ce-574b3efd6bfe7df64ec704844f2619c547731aa6.tar.gz |
Fixes the user order being overriden in the autocomplete controllerfix-exact-matches-of-username-and-email-on-top-of-the-user-search
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index dd1a391773a..8f40af24e20 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -314,7 +314,7 @@ class User < ActiveRecord::Base table[:name].matches(pattern) .or(table[:email].matches(pattern)) .or(table[:username].matches(pattern)) - ).reorder(order % { query: ActiveRecord::Base.connection.quote(query) }, id: :desc) + ).reorder(order % { query: ActiveRecord::Base.connection.quote(query) }, :name) end # searches user by given pattern |