Commit c9389d0e authored by Allister Antosik's avatar Allister Antosik

Sorted autocomplete users list by name

parent 400b3d26
...@@ -48,6 +48,7 @@ v 8.0.0 (unreleased) ...@@ -48,6 +48,7 @@ v 8.0.0 (unreleased)
- Fix highlighting of deleted lines in diffs. - Fix highlighting of deleted lines in diffs.
- Added service API endpoint to retrieve service parameters (Petheő Bence) - Added service API endpoint to retrieve service parameters (Petheő Bence)
- Add FogBugz project import (Jared Szechy) - Add FogBugz project import (Jared Szechy)
- Sort users autocomplete lists by user (Allister Antosik)
v 7.14.3 v 7.14.3
- No changes - No changes
......
...@@ -32,6 +32,7 @@ class AutocompleteController < ApplicationController ...@@ -32,6 +32,7 @@ class AutocompleteController < ApplicationController
@users ||= User.none @users ||= User.none
@users = @users.search(params[:search]) if params[:search].present? @users = @users.search(params[:search]) if params[:search].present?
@users = @users.active @users = @users.active
@users = @users.reorder(:name)
@users = @users.page(params[:page]).per(PER_PAGE) @users = @users.page(params[:page]).per(PER_PAGE)
unless params[:search].present? unless params[:search].present?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment