lib/pagy/extras/overflow.rb in pagy-5.2.2 vs lib/pagy/extras/overflow.rb in pagy-5.2.3
- old
+ new
@@ -25,10 +25,10 @@
when :last_page
requested_page = @vars[:page] # save the requested page (even after re-run)
initialize vars.merge!(page: @last) # re-run with the last page
@vars[:page] = requested_page # restore the requested page
when :empty_page
- @offset = @in = @from = @to = 0 # vars relative to the actual page
+ @offset = @items = @from = @to = 0 # vars relative to the actual page
if defined?(Calendar) && is_a?(Calendar) # only for Calendar instances
edge = @order == :asc ? @final : @initial # get the edge of the overflow side (neat, but it would work with any time)
@utc_from = @utc_to = edge.getutc # set both to the edge utc time (a query with >= && < will get no record)
end
@prev = @last # prev relative to the actual page