Sha256: b2ac8e0160d4dc82f801f265db9480d6b8a59c3b7c706e79913a2882b870dabe
Contents?: true
Size: 463 Bytes
Versions: 10
Compression:
Stored size: 463 Bytes
Contents
module NeatPages::Implants module MongoidCriteriaImplant def paginate(current) if current current.set_total_items self.count raise NeatPages::OutOfBound if current.out_of_bound? return self.offset(current.offset).limit(current.limit) else raise 'You need to initialize the pagination' end end end end Mongoid::Criteria.send :include, NeatPages::Implants::MongoidCriteriaImplant if defined? Mongoid
Version data entries
10 entries across 10 versions & 1 rubygems