Module: MongoMapper::Plugins::Pagination::ClassMethods

Defined in:
lib/mongo_mapper/plugins/pagination.rb

Instance Method Summary collapse

Instance Method Details

#paginate(opts = {}) ⇒ Object



8
9
10
# File 'lib/mongo_mapper/plugins/pagination.rb', line 8

def paginate(opts={})
  query.paginate({:per_page => per_page}.merge(opts))
end

#per_pageObject



6
# File 'lib/mongo_mapper/plugins/pagination.rb', line 6

def per_page; 25 end