Tutorials


Build a minimal decorator with Ruby in 30 minutes - Remi Mercier
A few weeks ago, I needed to add some view-related methods to an object. Decorators are my go-to pattern to handle this kind of logic.
Normally, I’d use the draper gem to build decorators. But the app I’m working on used an older and incompatible...

Implementing Semantic Search With Sequel and Pgvector - Custom AI Solutions
In my previous post, An LLM-based AI Assistant for the FastRuby.io Newsletter opens a new window, I introduced an AI-powered assistant we built with Sinatra to help our marketing team write summaries of blog posts for our newsletter.
In this post...

Create a Markdown-Powered Textarea with Stimulus | Rails Designer
Today I want to explore how to recreate (most of) GitHub’s markdown-powered textarea. It is a feature I want to add to Rails Designers (private community for Rails UI engineers) and thought it would be nice to share my first version with you.
I l...

Real-Time Communication with Twilio 2-Way SMS in Ruby on Rails Application – Josh Software
Two-way SMS communication has become a must-have feature for modern applications, enabling real-time, interactive messaging experiences. Whether it’s for sending OTPs, notifications, or enabling customer support, two-way SMS allows businesses to e...



Getting Answers from a Big PDF with RubyLLM - Max Chernyak
Some API vendors give you an API doc in a giant custom-edited PDF file. In my case it’s >1200 pages, with a “helpful” table of contents that itself spans about 20 pages.
Well, I dislike reading giant PDF docs, love writing Ruby, and there’s an aw...

Rails Controller Callback Order With Concerns - Kevin Murphy
We’re building an app to display the prompts from an automated phone system. The system will read these out when people call our technical support phone number. We use a callback to set the list of prompts to read. Whether you’re calling for detai...

How to get composite keys to play with Rails view helpers
We’ve seen in a previous article how making your object ActiveModel-compatible allows it to play natively with Rails’ URL helpers. What about a more complicated case: you have a custom in-memory object that doesn’t have a single primary key but in...