Path: | lib/sequel/extensions/pagination.rb |
Last Update: | Sat Aug 17 05:34:45 +0000 2013 |
The pagination extension adds the Sequel::Dataset#paginate and each_page methods, which return paginated (limited and offset) datasets with some helpful methods that make creating a paginated display easier.
This extension uses Object#extend at runtime, which can hurt performance.
You can load this extension into specific datasets:
ds = DB[:table] ds.extension(:pagination)
Or you can load it into all of a database‘s datasets, which is probably the desired behavior if you are using this extension:
DB.extension(:pagination)