Permalink
Browse files

Merge branch 'master' of github.com:tblobaum/mongoose-troop

  • Loading branch information...
2 parents f5c6893 + 6d9fe60 commit 9eea3f0841b1eb0c8b997fe99d62da53351f270b @tblobaum committed Jul 29, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 README.md
  2. +1 −1 lib/pagination.js
View
@@ -406,7 +406,7 @@ FooModel.paginate({
page: 2
, query: { count: { $gt: 25 } }
, limit: 25
-, fields: ['name']
+, fields: 'field1, field2'
}, function(err, docs, count, pages, current) {
// docs.length = 5
View
@@ -14,7 +14,7 @@ function pagination (schema, options) {
// Options
var defaultLimit = options.defaultLimit || 10
, defaultQuery = options.defaultQuery || {}
- , defaultFields = options.defaultFields || []
+ , defaultFields = options.defaultFields || {}
, remember = options.remember || false
, defaultPage = 1
, currentLimit = defaultLimit

0 comments on commit 9eea3f0

Please sign in to comment.