Tutorials


How to use UUIDv7 in Rails for primary keys | ptrchm
Using UUIDs for primary keys offers many benefits, but there are some downsides to consider. The most widely-used UUIDv4 is fully random, which is ideal for minimizing the risk of collision. However, random IDs as primary keys do not index and sor...

For clarity merging hashes use with_defaults - Andy Croll
Rails is known for adding methods to existing core Ruby classes for improved readability via Active Support. One such example is the with_defaults method on Hash. This method is an alias of another added method reverse_merge, which should give you...



How GitHub Actions can turn your code into a Docker daemon: A quick way to automate Ruby releases
So let’s say that you have a shiny new Ruby program that you wrote. But how will you ensure every environment has the right version of Ruby installed and every user knows how to install all of its dependencies? Before you answer that yourself, ask...


Gem Credentials Management with Gemstash | Petr Hlavicka
How can we efficiently manage gem credentials across the teamWhen your project grows, you may reach out to enterprise gems (like Sidekiq Pro) for help or want to extract some business logic into private gems.Bundler has a way to set the credential...

How to Customize Rails Validation Errors to Remove Leading Attribute Column Names
Rails validations is an elegant way to verify the model state before it's saved into the database. Often, you want to provide a custom, user-friendly error message to the user. In this post, we'll learn how to accomplish this with custom validatio...

37signals Dev — Building Basecamp project stacks with Hotwire
It’s been two decades since Rails changed the way we build web apps. As the demand for richer and richer UIs grew, teams came up with different frontends to deliver on those expectations. Client-side frameworks such as Angular, Ember, and React em...