Open
Description
We would love to implement custom sort to this gem. It should let you decide the order of output, because sometimes you don't want the order given in classified sort.
How I would do that:
Add new option parameters 'sort_order'
- array representing the order of output e.g. ['pk', 'associations', 'rest_cols', 'timestamps']
and boolean param 'custom_sort'
.
The sort method could be almost entirely same as classified_sort, only difference being the last line where instead of
([id] << rest_cols << timestamps << associations).flatten.compact
would be something like
(sort_order[0] << sort_order[1] << sort_order[2] << sort_order[3]).flatten.compact
I am able to make this PR if you're interested.