Rails String#upcase_first VS capitalize and titleize

What comes in your mind when you have a task to make the first letter of a string uppercase? You might think about using capitalize method, or titleize method.

In one of my recent projects, we’ve been asked to ensure first capital letter in first and last name of a user. Sounds simple right? We’ve used Rails 7.1 normalization API together with String#titleize.

Validate belongs_to association in Rails

Eight years ago, Rails 5 made the belongs_to association required by default. This solved a lot of problems with orphaned records in the database. But sometimes, you need to have an optional association, which may lead to situations that you don’t expect.

Lazy-load offscreen iframes!

A week ago I finished update of this website and it was my first front-end related task in a while. I’ve learned a lot of new things that I want to share with you. The may sound obvious for some of you, but I still think they deserve to be mentioned. One of them is lazy-loading offscreen iframes.

Maybe – open-source personal finance app

In this episode, I explore the Maybe finance code base. The original version of Maybe was written in React and then open-sourced. In February 2024, Josh Pigford started to rewrite it in Rails. What is done within two months, what can be improved, what tools and libraries are used – all these in this video.