API de comptabilité horaire.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12345678910111213 |
- module Paginated
- DEFAULT_COUNT_BY_PAGE = 10
- # can be overwritten
- def count_by_page
- DEFAULT_COUNT_BY_PAGE
- end
-
- def paginate(params)
- page = (params.fetch :page, 0).to_i
- start = page * count_by_page
- offset(start).limit(count_by_page)
- end
- end
|