diff --git a/docs/api/pagy.md b/docs/api/pagy.md index c6badfd8a..8582f9445 100644 --- a/docs/api/pagy.md +++ b/docs/api/pagy.md @@ -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` | diff --git a/lib/pagy.rb b/lib/pagy.rb index b18c6a543..086787f23 100644 --- a/lib/pagy.rb +++ b/lib/pagy.rb @@ -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