Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit 69e86c7

Browse files
authored
Merge pull request #2 from newsdev/sort-index-names
sort names on user index page
2 parents c542a3a + 8e36f21 commit 69e86c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/users_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class UsersController < ApplicationController
55

66
# GET /users
77
def index
8-
@users = User.all
8+
@users = User.all.sort_by { |obj| (obj.display_name.nil? ? 0 : obj.display_name.downcase) }
99
end
1010

1111
# GET /users/1

0 commit comments

Comments
 (0)