summaryrefslogtreecommitdiff
path: root/app/models/design_management/design.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 01:45:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 01:45:44 +0000
commit85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch)
tree9160f299afd8c80c038f08e1545be119f5e3f1e1 /app/models/design_management/design.rb
parent15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff)
downloadgitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'app/models/design_management/design.rb')
-rw-r--r--app/models/design_management/design.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/app/models/design_management/design.rb b/app/models/design_management/design.rb
index deda814d689..57bb250829d 100644
--- a/app/models/design_management/design.rb
+++ b/app/models/design_management/design.rb
@@ -79,16 +79,10 @@ module DesignManagement
joins(join.join_sources).where(actions[:event].not_eq(deletion))
end
- scope :ordered, -> (project) do
- # TODO: Always order by relative position after the feature flag is removed
- # https://gitlab.com/gitlab-org/gitlab/-/issues/34382
- if Feature.enabled?(:reorder_designs, project, default_enabled: true)
- # We need to additionally sort by `id` to support keyset pagination.
- # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17788/diffs#note_230875678
- order(:relative_position, :id)
- else
- in_creation_order
- end
+ scope :ordered, -> do
+ # We need to additionally sort by `id` to support keyset pagination.
+ # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17788/diffs#note_230875678
+ order(:relative_position, :id)
end
scope :in_creation_order, -> { reorder(:id) }