diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-02-03 11:30:22 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-02-03 11:30:22 +0100 |
commit | 888fba1e0566d83fef8b2504b3d68a19dbc133f7 (patch) | |
tree | 06e1ba2b5820e471c2b7bb58c25c4ee1e7ca8b62 /app/serializers | |
parent | 030adf12ce6dc8e10a9f0bbb34ff55aa818d7aed (diff) | |
download | gitlab-ce-888fba1e0566d83fef8b2504b3d68a19dbc133f7.tar.gz |
Order environments twice in environments serializer
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/environment_serializer.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/serializers/environment_serializer.rb b/app/serializers/environment_serializer.rb index c556424a414..2d8d1f20ddc 100644 --- a/app/serializers/environment_serializer.rb +++ b/app/serializers/environment_serializer.rb @@ -42,6 +42,7 @@ class EnvironmentSerializer < BaseSerializer 'MAX(id) AS last_environment_id') environments = resource.where(id: items.map(&:last)) + .order('COALESCE(environment_type, name) ASC') items.zip(environments).map do |item| Struct::Item.new(*item.flatten) |