Open indolent-gnathostome opened 10 years ago
I updated the gist with a 'paginator_data' helper method. It moves the sorting logic out of the paginator method and returns a mustache-friendly data structure. Tests still pass.
@indolent-gnathostome sorry for the long dely. I definitely appreciate the detailed gist. I am looking to include this functionality in ruhoh 3.0 so I'm currently studying your code, thanks!
I have a collection that needs to:
This is a friendlier way to display some content, and makes each paginated url more bookmark-friendly.
The config.yml could support this with an optional 'sort' parameter within a collection's paginator:
I've implemented this behavior as a plugin (+cucumber test), available in this gist:
Ideally, this would be a feature of the core paginator.