lib/rest-ftp-daemon/paginate.rb in rest-ftp-daemon-0.222.0 vs lib/rest-ftp-daemon/paginate.rb in rest-ftp-daemon-0.230.0

- old
+ new

@@ -16,11 +16,11 @@ # Count elements @total = @data.count # Count pages - @pages = (@total.to_f / PAGINATE_MAX).ceil + @pages = (@total.to_f / DEFAULT_PAGE_SIZE).ceil @pages = 1 if @pages < 1 end def only= raw_only @only = raw_only @@ -37,10 +37,10 @@ end out.join() end def subset - size = PAGINATE_MAX.to_i + size = DEFAULT_PAGE_SIZE.to_i offset = (@page-1) * size @data[offset, size] end private