George Kurobara Benjamin
Joined
4,530 Experience
45 Lessons Completed
0 Questions Solved
Activity
Posted in Link Pagination with Pagy Discussion
An alternative to handling the Pagy::OverflowError is setting the Pagy::DEFAULT[:overflow] to either :empty_page, or :last_page https://ddnexus.github.io/pagy/docs/extras/overflow/
Why does the chart disappear when an unauthorized user tries to click edit? Anyone else noticed this?
Posted in Base62 Encoding Short Codes Discussion
This version is a bit shorter.
while number > 0
number, remainder = number.divmod(BASE)
result.prepend(CHARACTERS[remainder])
end