Commit graph

21 commits

Author SHA1 Message Date
Sean McGivern
8170384d80 Revert "Merge branch 'revert-2c879643' into 'master'"
This reverts merge request !12633
2017-07-14 11:38:06 +00:00
Douwe Maan
2c78c7f4cd Revert "Merge branch 'revert-12499' into 'master'"
This reverts merge request !12557
2017-07-04 17:08:41 +00:00
Adam Niedzielski
a3d7983b18 Revert "Merge branch 'dm-drop-default-scope-on-sortable-finders' into 'master'"
This reverts commit b07c00032b, reversing
changes made to 2b97d76d0b.
2017-06-29 16:14:12 +02:00
Douwe Maan
4d6ee98d86 Drop default ORDER scope when calling a find method on a Sortable model 2017-06-28 14:23:36 -05:00
Grzegorz Bizon
0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Douwe Maan
1fe7501b49 Revert "Prefer leading style for Style/DotPosition"
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
2017-02-23 09:33:05 -06:00
Douwe Maan
206953a430 Prefer leading style for Style/DotPosition 2017-02-23 09:32:22 -06:00
Douwe Maan
5c7f9d69e3 Fix code for cops 2017-02-23 09:31:57 -06:00
Douwe Maan
8a4d68c53e Enable Style/ConditionalAssignment 2017-02-23 09:31:57 -06:00
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