Commit graph

7 commits

Author SHA1 Message Date
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