lib/pagy.rb in pagy-0.8.3 vs lib/pagy.rb in pagy-0.8.4
- old
+ new
@@ -1,17 +1,17 @@
# See Pagy API documentation: https://ddnexus.github.io/pagy/api/pagy
require 'pathname'
-class Pagy ; VERSION = '0.8.3'
+class Pagy ; VERSION = '0.8.4'
class OutOfRangeError < StandardError; end
# root pathname to get the path of pagy files like templates or dictionaries
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: {} }
+ # default vars
+ VARS = { page:1, items:20, outset:0, size:[1,4,4,1], page_param: :page, params: {}, anchor: ''.freeze, link_extra: ''.freeze, item_path: 'pagy.info.item_name'.freeze }
attr_reader :count, :page, :items, :vars, :pages, :last, :offset, :from, :to, :prev, :next
# merge and validate the options, do some simple aritmetic and set the instance variables
def initialize(vars)