Tutorials

Dynamic form fields with Turbo Frames and Hotwire - YouTube
In this video, I'll show you a neat trick to swap out form fields dynamically using Turbo Frames and a tiny bit of stimulus JS (only ~5 lines). This is something I've used on a few production projects and comes in handy. If you like this content, ...

How to roll your own authentication in Rails - YouTube
In this video, I show you how to make your own authentication in Ruby on Rails, from scratch. We make use of the has_secure_password module (don’t forget to enable the 'bcrypt' gem) and create a login form, logout and all of the helpers you will n...




How to fake time in a Postgres database: And an example Ruby on Rails app, too!
First things first, I am writing this despite my general opposition to faking time. Typically, when invoking an API in a unit or integration test, it’s preferable to pass time as a value as opposed to mutating a global clock. And if you’re writing...



Ruby 3.1 introduces Variable Width Allocation for Strings | Saeloun Blog
This post is in continuation of part 1 and in this blog, we will take a deeper look at how Variable Width Allocation works and how it can improve Ruby’s memory performance. Before getting into the VWA let us understand how large objects get alloca...