From 90f2185814fbd87773540af589db9904d7606952 Mon Sep 17 00:00:00 2001 From: Josie Liu Date: Thu, 5 May 2016 15:39:53 +0800 Subject: [PATCH] correct a single error --- app/models/zip.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/zip.rb b/app/models/zip.rb index 0990f7f..2a35de2 100644 --- a/app/models/zip.rb +++ b/app/models/zip.rb @@ -85,12 +85,12 @@ def self.paginate(params) #get the associated page of Zips -- eagerly convert doc to Zip zips=[] - all(params, sort, offset, limit).each do |doc| + all({}, sort, offset, limit).each do |doc| zips << Zip.new(doc) end #get a count of all documents in the collection - total=all(params, sort, 0, 1).count + total=all({}, sort, 0, 1).count WillPaginate::Collection.create(page, limit, total) do |pager| pager.replace(zips)