Skip to content

Instantly share code, notes, and snippets.

@bradpauly
Created February 24, 2023 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradpauly/673318242d09d0506b66607b71f5d231 to your computer and use it in GitHub Desktop.
Save bradpauly/673318242d09d0506b66607b71f5d231 to your computer and use it in GitHub Desktop.
# Assuming we have 33 rows.
pager = Pager.new(rows: rows, rows_per_page: 10)
pager.rows(1) # The first 10 rows
pager.rows(2) # The next 10 rows
pager.rows(3) # The next 10 rows
pager.rows(4) # The last 3 rows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment