Skip to content

Commit

Permalink
add Pagy::VARS[:anchor] empty default
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Jun 2, 2018
1 parent 8789edd commit ce8d09a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/api/pagy.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ These are the non-core variables: as for the core-variables they can be set glob
| `:size` | the size of the page links to show: array of initial pages, before current page, after current page, final pages. (see also [Control the page links](../how-to.md#controlling-the-page-links))_ | `[1,4,4,1]` |
| `:page_param` | the name of the page param name used in the url. (see [Customizing the page param](../how-to.md#customizing-the-page-param) | `:page` |
| `:params` | the arbitrary param hash to add to the url. (see [Customizing the params](../how-to.md#customizing-the-params) | `{}` |
| `:anchor` | the arbitrary anchor string (including the "#") to add to the url. (see [Customizing the page param](../how-to.md#customizing-the-params) | `nil` |
| `:anchor` | the arbitrary anchor string (including the "#") to add to the url. (see [Customizing the page param](../how-to.md#customizing-the-params) | `""` |
| `:link_extra` | the extra attributes string (formatted as a valid HTML attribute/value pairs) added to the page links | `""` |
| `:item_path` | the dictionary path used by the `pagy_info` method to lookup the item/model name | `nil` |

Expand Down
2 changes: 1 addition & 1 deletion lib/pagy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class OutOfRangeError < StandardError; end
def self.root; Pathname.new(__FILE__).dirname end

# default core vars
VARS = { page:1, items:20, outset:0, size:[1,4,4,1], page_param: :page, params: {}, link_extra: ''.freeze }
VARS = { page:1, items:20, outset:0, size:[1,4,4,1], page_param: :page, params: {}, link_extra: ''.freeze, anchor: ''.freeze }

attr_reader :count, :page, :items, :vars, :pages, :last, :offset, :from, :to, :prev, :next

Expand Down

0 comments on commit ce8d09a

Please sign in to comment.