lib/highrise/pagination.rb in peterosullivan-highrise-3.0.6 vs lib/highrise/pagination.rb in peterosullivan-highrise-3.0.7

- old
+ new

@@ -36,10 +36,11 @@ def each(options = {}) options[:params] ||= {} options[:params][:n] = 0 loop do - if (records = self.find(:all, options)).try(:any?) + records = find(:all, options) + if records && records.any? records.each { |record| yield record } options[:params][:n] += records.size else break # no people included on that page, thus no more people total end