lib/rentjuicer/listings.rb in rentjuicer-0.6.0 vs lib/rentjuicer/listings.rb in rentjuicer-0.6.1
- old
+ new
@@ -84,10 +84,10 @@
end
def paginator
paginator_cache if paginator_cache
self.paginator_cache = WillPaginate::Collection.create(
- self.body.page,
+ self.body.page ||= 1,
@limit,
(self.body.total_count ? self.body.total_count : properties.size)) do |pager|
pager.replace properties
end
end