Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-01-06 19:29:44 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2016-01-07 16:53:02 +0300
commit9dacc3bc568c6c8cfc4a1bc1af23eb96f9eae9b0 (patch)
tree9560b56e8b8cb45035c035829b9125fd0b711d3a /app/helpers/sorting_helper.rb
parent7a240397afc56ab366b6c3504761fbf531b78ec1 (diff)
Sort by ID when sorting using "Recently created"
Sorting by "id" has the same effect as sorting by created_at while performing far better and without the need of an extra index (in case one wanted to speed up sorting by "created_at"). Sorting by "Recently updated" still uses the physical "updated_at" column as there's no way to use the "id" column for this instead.
Diffstat (limited to 'app/helpers/sorting_helper.rb')
-rw-r--r--app/helpers/sorting_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/sorting_helper.rb b/app/helpers/sorting_helper.rb
index bb12d43f397..9a7c26d1ccf 100644
--- a/app/helpers/sorting_helper.rb
+++ b/app/helpers/sorting_helper.rb
@@ -63,11 +63,11 @@ module SortingHelper
end
def sort_value_oldest_created
- 'created_asc'
+ 'id_asc'
end
def sort_value_recently_created
- 'created_desc'
+ 'id_desc'
end
def sort_value_milestone_soon