Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Using randomly generated IDs like Nano ID could be a good alternative, however, as a developer, we must understand what Nano ID really does in our application. Defining the number of characters in the generated IDs is also important, to help with that Nano ID has a Collision Calculator to give us how many years in order to have a 1% probability of collision.
In this post, we are focusing on the Rails ecosystem which try to implement Nano ID in the Rails application. Nano ID has been ported to many programming languages including Ruby, you can check the Nano ID for Ruby here.
Download source code: https://github.com/daily-newer/rails-nanoid