Skip to content
Snippets Groups Projects
Commit f7ae1bce authored by Dmitry Moskalchuk's avatar Dmitry Moskalchuk
Browse files

Syntax fix of sorting groups/users

parent a9c1b85e
No related branches found
No related tags found
1 merge request!3013Sort groups alphabetically on dashboard page
Loading
Loading
@@ -5,7 +5,7 @@ class DashboardController < ApplicationController
before_filter :event_filter, only: :show
 
def show
@groups = current_user.authorized_groups.sort_by { |x| x.human_name }
@groups = current_user.authorized_groups.sort_by(&:human_name)
@has_authorized_projects = @projects.count > 0
@teams = current_user.authorized_teams
@projects_count = @projects.count
Loading
Loading
Loading
Loading
@@ -10,8 +10,8 @@ module NamespacesHelper
 
 
global_opts = ["Global", [['/', Namespace.global_id]] ]
group_opts = ["Groups", groups.sort_by {|g| g.human_name}.map {|g| [g.human_name, g.id]} ]
users_opts = [ "Users", users.sort_by {|u| u.human_name}.map {|u| [u.human_name, u.id]} ]
group_opts = ["Groups", groups.sort_by(&:human_name).map {|g| [g.human_name, g.id]} ]
users_opts = [ "Users", users.sort_by(&:human_name).map {|u| [u.human_name, u.id]} ]
 
options = []
options << global_opts if current_user.admin
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment