Commit graph

12 commits

Author SHA1 Message Date
Alejandro Rodríguez
7bd6ff03d8 Fix and improve Sortable.highest_label_priority 2016-10-27 21:26:56 -03:00
Douglas Barbosa Alexandre
928acba4c0 Use keyword arguments on Sortable#highest_label_priority 2016-10-19 14:58:27 -02:00
Douglas Barbosa Alexandre
3c2aaec1f2 Fix sorting by label priorities 2016-10-19 14:58:27 -02:00
Felipe Artur
37bf35f0bc Todos sorting dropdown 2016-08-19 16:14:20 -03:00
Yorick Peterse
9dacc3bc56 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.
2016-01-07 14:53:02 +01:00
Yorick Peterse
656d9ff69b Make it easier to re-apply default sort orders
By moving the default sort order into a separate scope (and calling this
from the default scope) we can more easily re-apply a default order
without having to specify the exact column/ordering all over the place.
2015-11-18 13:05:45 +01:00
Yorick Peterse
732f5380af Only sort by IDs by default
Sorting by both "created_at" and "id" in descending order is not needed
as simply sorting by "id" in descending order will already sort rows
from new to old. Depending on the query and data involved sorting twice
can also introduce significant overhead.
2015-11-03 11:54:43 +01:00
Dmitriy Zaporozhets
4cce10583d Fix tests for semaphore 2015-02-06 23:57:28 -08:00
Dmitriy Zaporozhets
c5be267e40 Refactor issuable sorting a bit 2015-02-05 20:21:21 -08:00
Dmitriy Zaporozhets
bbca6a0abd Refactor sorting in project 2015-02-05 19:15:05 -08:00
Dmitriy Zaporozhets
e0aa5c371e Fix method overlap for issue sorting 2015-02-05 16:49:41 -08:00
Dmitriy Zaporozhets
62ed1c537e Explicitly define ordering in models using default_scope 2015-02-05 14:20:55 -08:00