-
-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reinstate sorting by arbitrary list of product categories
- Loading branch information
1 parent
686f8fd
commit 285b41d
Showing
7 changed files
with
33 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'pagy/extras/arel' | ||
require 'pagy/extras/items' | ||
require 'pagy/extras/overflow' | ||
|
||
|
||
# Pagy Variables | ||
# See https://ddnexus.github.io/pagy/api/pagy#variables | ||
Pagy::DEFAULT[:items] = 100 | ||
|
||
# Items extra: Allow the client to request a custom number of items per page with an optional selector UI | ||
# See https://ddnexus.github.io/pagy/extras/items | ||
require 'pagy/extras/items' | ||
Pagy::DEFAULT[:items_param] = :per_page | ||
Pagy::DEFAULT[:max_items] = 100 | ||
|
||
# For handling requests for non-existant pages eg: page 35 when there are only 4 pages of results | ||
require 'pagy/extras/overflow' | ||
Pagy::DEFAULT[:overflow] = :empty_page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters