Ruby

Hanakai, and Hanami 3.0 in Full Bloom

3 minute read

Hanami, dry and rom have joined forces as Hanakai, a single family of Ruby tools. The first release under that banner is Hanami 3.0: built-in mailers and i18...

Rails 8 Wants You to Own Your Stack

3 minute read

Rails 8 isn’t really a bag of new methods. Its headline is a stance: drop Redis, drop the PaaS, and run a real app from a single box you own — with the datab...

Five dry-rb Gems Worth Knowing

2 minute read

A short tour of five dry-rb gems I keep coming back to: validation, types, structs, configuration, and composable business logic. Small, focused libraries th...

Practical Service Objects in Ruby

2 minute read

Service objects keep business logic out of fat controllers and models. A handful of conventions (one entry point, a consistent return value, a simple constru...

Full-Text Search in Rails with PostgreSQL

3 minute read

Before reaching for Elasticsearch, it’s worth knowing that PostgreSQL has capable full-text search built in. Here’s how to use it from a Rails app — tokenizi...

Hanami 2 Is Finally Full-Stack

3 minute read

Hanami 2 arrived in three acts: the app rewrite in 2.0, views in 2.1, and a full ROM-based database layer in 2.2. With that last piece, it’s a complete full-...

The Rails 7.1 Features I Actually Reach For

2 minute read

Rails 7.1 isn’t a headline release. It’s a pile of quality-of-life additions that quietly remove boilerplate you write all the time — normalizing attributes,...

Creating a deeply nested Hash in Ruby

3 minute read

Sometimes you’ll have to create a deeply nested hash without knowing how deep it can be at first. This hash should allow reading and setting values at any le...

Ruby one-liners for file manipulations

10 minute read

Most people using Ruby nowdays are using it for Rails. They often defined themselves has ‘Rails developers’, not ‘Ruby developers’. I’m an early adopter of R...

Translating ActiveRecord data using JSON

4 minute read

Following the mass and using de-facto libraries isn’t always the best choice. Here are some thoughts about handling translation of data stored in database wh...

Using I18n with Hanami

1 minute read

Last week I wrote about settings up Sikekiq in Hanami. Another gem I often use is I18n since it allows to localize strings and keep them separated from my co...

Using Sidekiq with Hanami

3 minute read

One of the gems I often use in my Ruby on Rails projects is Sikekiq. For those of you who don’t know about it, it allows to easily manage background processes.

How to use infinity in your code

less than 1 minute read

You’ll sometimes have to use the notion of infinity in your Ruby code. There isn’t any way to directly use infinity in Ruby, at least none that I know of… Bu...

Thor - a command-line scripting tool

5 minute read

Thor is a simple and efficient tool for building self-documenting command line utilities. I’m a shell guy, I use a terminal everyday and most of my job is do...

Default stack for Ruby projects

8 minute read

Having a clear and well-defined default stack when you start a new project is a good thing — it will have an impact on your productivity and happiness. I’ll ...

Encapsulate a code block in an object

3 minute read

Ruby is a very dynamic language which allows you to do things like encapsulate a piece of code in an object. This is a really powerful capability you can use...